Commits

Tim Pettersen committed 3827256 Merge

Merged in feature/AC-760-oauth-delete-method-type (pull request #7)

AC-760: fix oauth signatures on DELETE requests to host

Comments (0)

Files changed (1)

lib/internal/host-request.js

 
     if (isHostUrl) {
       if (!options.headers) options.headers = {};
+
+      if (method === "del") {
+        // AC-760, Mikeal Rogers' request package uses the shorthand function name 'del' for the DELETE method type
+        method = "delete";
+      }
+
       options.headers['Authorization'] = oauth.sign({
         url: options.uri,
         method: method || options.method || 'GET',