Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added method to curl args.

This allows for actions besides GET and POST
(i.e. PUT and DELETE).
  • Loading branch information...
commit 4f925c4f9935ffac5d2d06b12fcb2291e7201163 1 parent be181aa
@psanford authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 oauth.el
View
6 oauth.el
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.