1. Atlassian
  2. Atlassian Connect
  3. atlassian-connect-express

Commits

Tim Pettersen [Atlassian]  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

  • Participants
  • Parent commits 320de2b, 78817ba
  • Branches master

Comments (0)

Files changed (1)

File lib/internal/host-request.js

View file
  • Ignore whitespace
 
     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',