From 0b868cf8c967fedb936f5bd26e793db417cc2af3 Mon Sep 17 00:00:00 2001 From: Rudi Werner Date: Tue, 6 Nov 2018 19:14:06 +0100 Subject: [PATCH] Update index.js Add Put function ? --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index dc164ab..95726ed 100644 --- a/index.js +++ b/index.js @@ -92,6 +92,12 @@ module.exports = function () { this.curl.setOpt(Curl.option.CUSTOMREQUEST, 'POST'); return this._submit(); }; + + this.put = (url) => { + this._setUrl(url); + this.curl.setOpt(Curl.option.CUSTOMREQUEST, 'PUT'); + return this._submit(); + }; this.patch = (url) => { this._setUrl(url); @@ -174,4 +180,4 @@ module.exports = function () { }; return this; -}; \ No newline at end of file +};