Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Don't autoredirect.
  • Loading branch information
Tim Fletcher committed Dec 12, 2008
1 parent 43737af commit 3d37481c02eeae2f261bad49e908d4c8585f98e5
Showing 1 changed file with 3 additions and 2 deletions.
@@ -13,7 +13,8 @@ get(URL, Consumer, TokenPair) ->

get(URL, Consumer, TokenPair, Params) ->
Request = oauth_request:new("GET", URL, Params),
http:request(oauth_request:to_url(Request, Consumer, TokenPair)).
RequestURL = oauth_request:to_url(Request, Consumer, TokenPair),
http:request(get, {RequestURL, []}, [{autoredirect, false}], []).

post(URL, Consumer) ->
post(URL, Consumer, {[], []}, []).
@@ -27,4 +28,4 @@ post(URL, Consumer, TokenPair, Params) ->
Request = oauth_request:new("POST", URL, Params),
Data = oauth_request:to_string(Request, Consumer, TokenPair),
MimeType = "application/x-www-form-urlencoded",
http:request(post, {URL, [], MimeType, Data}, [], []).
http:request(post, {URL, [], MimeType, Data}, [{autoredirect, false}], []).

0 comments on commit 3d37481

Please sign in to comment.