Commits

Tim Pettersen committed 78817ba

AC-760: map 'del' function name to 'DELETE' method type

  • Participants
  • Parent commits 320de2b

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',