20029: Add collection batch file delete/copy/move and unit tests
[arvados-workbench2.git] / src / common / webdav.ts
index bb8a68bdd221e1733d42f0f64b8c61e434863304..c95d8747e5b495d45ca8400a348fb4cb89e1bfa7 100644 (file)
@@ -88,6 +88,15 @@ export class WebDAV {
             method: 'DELETE'
         })
 
+    mkdir = (url: string, config: WebDAVRequestConfig = {}) =>
+        this.request({
+            ...config, url,
+            method: 'MKCOL',
+            headers: {
+                ...config.headers,
+            }
+        })
+
     private request = (config: RequestConfig) => {
         return new Promise<XMLHttpRequest>((resolve, reject) => {
             const r = this.createRequest();