Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Don't use atoms to represent the HTTP method at all.
  • Loading branch information
Tim Fletcher committed Aug 24, 2008
1 parent e867f1e commit d2e75bd5ffbe8f06e33f087187a3f18623cf74f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
@@ -18,7 +18,7 @@ get(URL, Consumer, Params) when is_list(Params)->
get(URL, Consumer, {oauth_tokens, Tokens}, Params) ->
get(URL, Consumer, Tokens, Params);
get(URL, Consumer, Tokens, Params) when is_list(Tokens) ->
http:request(oauth_request:url(get, URL, Params, Consumer, Tokens)).
http:request(oauth_request:url("GET", URL, Params, Consumer, Tokens)).

post(URL, Consumer) ->
post(URL, Consumer, [], []).
@@ -31,7 +31,7 @@ post(URL, Consumer, Params) when is_list(Params) ->
post(URL, Consumer, {oauth_tokens, Tokens}, Params) ->
post(URL, Consumer, Tokens, Params);
post(URL, Consumer, Tokens, Params) when is_list(Tokens) ->
SignedParamsString = oauth_request:params_string(post, URL, Params, Consumer, Tokens),
SignedParamsString = oauth_request:params_string("POST", URL, Params, Consumer, Tokens),
Request = {URL, [], "application/x-www-form-urlencoded", SignedParamsString},
http:request(post, Request, [], []).

@@ -51,7 +51,7 @@ signature(Method, URL, Params, Consumer, TokenSecret) ->
"PLAINTEXT" ->
oauth_plaintext:signature(ConsumerSecret, TokenSecret);
"HMAC-SHA1" ->
oauth_hmac:signature({string:to_upper(atom_to_list(Method)), URL, Params}, ConsumerSecret, TokenSecret)
oauth_hmac:signature({Method, URL, Params}, ConsumerSecret, TokenSecret)
end.

signature_method(Params) ->

0 comments on commit d2e75bd

Please sign in to comment.