Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix oauth post issues

  • Loading branch information...
commit ad3a8824f41bfddb9fc8857559cbfa6212bc73e3 1 parent 224f0ec
@zachgraves zachgraves authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 oauth/oauth.utils.js
View
11 oauth/oauth.utils.js
@@ -35,12 +35,13 @@ function getRequest(args)
function postRequest(args)
{
- var data = oAuthBuildContent(args.parameters);
var auth = (args.accessor) ? oAuthSignRequest(args) : null;
-
+ var data = oAuthBuildContent(auth.message.parameters);
+
var rsp = null;
try {
- if(auth) request.header('Authorization', auth.header);
+ //if(auth) request.header('Authorization', auth.header);
+ request.header('Content-Type', 'application/x-www-form-urlencoded');
rsp = request.post( data ).response;
} catch(err) {
rsp = {'result':'failure', 'error': err};
@@ -106,7 +107,7 @@ function oAuthSignRequest(args)
if(accessor.token) {
OAuth.setParameter(message, "oauth_token", accessor.token);
}
-
+
OAuth.SignatureMethod.sign(message, accessor);
var realm = accessor.realm || '';
@@ -118,4 +119,4 @@ function oAuthSignRequest(args)
}
return auth;
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.