diff --git a/README.md b/README.md index 0a17b0d2..2539d149 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ It implements the following methods : * GET (file get content) * MKCOL (directory creation) * PROPFIND (get file information) -* PUT (set the content of a file and create it if it doesn't exist) +* PUT/POST (set the content of a file and create it if it doesn't exist) Find more details on the process at [https://github.com/OpenMarshal/npm-WebDAV-Server/projects/1](https://github.com/OpenMarshal/npm-WebDAV-Server/projects/1). diff --git a/lib/server/commands/Commands.js b/lib/server/commands/Commands.js index 028cb12d..e37f92fd 100644 --- a/lib/server/commands/Commands.js +++ b/lib/server/commands/Commands.js @@ -3,12 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); var NotImplemented_1 = require("./NotImplemented"); var Propfind_1 = require("./Propfind"); var Mkcol_1 = require("./Mkcol"); +var Post_1 = require("./Post"); var Put_1 = require("./Put"); var Get_1 = require("./Get"); exports.default = { NotImplemented: NotImplemented_1.default, Propfind: Propfind_1.default, Mkcol: Mkcol_1.default, + Post: Post_1.default, Put: Put_1.default, Get: Get_1.default }; diff --git a/lib/server/commands/Post.d.ts b/lib/server/commands/Post.d.ts new file mode 100644 index 00000000..0f6c5205 --- /dev/null +++ b/lib/server/commands/Post.d.ts @@ -0,0 +1,2 @@ +import Put from './Put'; +export default Put; diff --git a/lib/server/commands/Post.js b/lib/server/commands/Post.js new file mode 100644 index 00000000..8c5a09f9 --- /dev/null +++ b/lib/server/commands/Post.js @@ -0,0 +1,4 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Put_1 = require("./Put"); +exports.default = Put_1.default; diff --git a/src/server/commands/Commands.ts b/src/server/commands/Commands.ts index cd2bfe90..502b7394 100644 --- a/src/server/commands/Commands.ts +++ b/src/server/commands/Commands.ts @@ -1,6 +1,7 @@ import NotImplemented from './NotImplemented' import Propfind from './Propfind' import Mkcol from './Mkcol' +import Post from './Post' import Put from './Put' import Get from './Get' @@ -8,6 +9,7 @@ export default { NotImplemented, Propfind, Mkcol, + Post, Put, Get } diff --git a/src/server/commands/Post.ts b/src/server/commands/Post.ts new file mode 100644 index 00000000..3cf33be2 --- /dev/null +++ b/src/server/commands/Post.ts @@ -0,0 +1,3 @@ + +import Put from './Put' +export default Put