Permalink
Browse files

Added method to curl args.

This allows for actions besides GET and POST
(i.e. PUT and DELETE).
  • Loading branch information...
1 parent be181aa commit 4f925c4f9935ffac5d2d06b12fcb2291e7201163 @psanford committed Jan 20, 2009
Showing with 4 additions and 2 deletions.
  1. +4 −2 oauth.el
View
@@ -204,7 +204,7 @@ Returns a buffer of the response."
(let ((url-request-method "POST")
(oauth-post-vars-alist post-vars-alist))
(oauth-url-retrieve access-token url)))
-
+
(defun oauth-epoch-string ()
"Returns a unix epoch timestamp string"
(format "%d" (ftruncate (float-time (current-time)))))
@@ -321,7 +321,9 @@ can be fed to curl"
(defun oauth-curl-retrieve (url)
"Retrieve via curl"
(set-buffer (generate-new-buffer "*oauth-request*"))
- (let ((curl-args `("-s" ,(when oauth-curl-insecure "-k") "-i" ,url
+ (let ((curl-args `("-s" ,(when oauth-curl-insecure "-k")
+ "-X" ,url-request-method
+ "-i" ,url
,@(when oauth-post-vars-alist
(apply
'append

0 comments on commit 4f925c4

Please sign in to comment.