diff options
author | Julien Danjou <julien@danjou.info> | 2011-12-20 11:30:30 +0100 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2011-12-20 11:30:30 +0100 |
commit | 9002a04be0d1226880354e6c957e62042b458249 (patch) | |
tree | 7e9764cb106a17fb10562852303a31a17a877945 /packages/oauth2 | |
parent | b8fdaf13c6a681740e0d79a078c2eb375963a007 (diff) | |
download | emacs-9002a04be0d1226880354e6c957e62042b458249.tar.gz |
oauth2: allow to use any HTTP request type
* oauth2: allow to use any HTTP request type
Diffstat (limited to 'packages/oauth2')
-rw-r--r-- | packages/oauth2/oauth2.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/oauth2/oauth2.el b/packages/oauth2/oauth2.el index 3b57c05c176..7175606f74d 100644 --- a/packages/oauth2/oauth2.el +++ b/packages/oauth2/oauth2.el @@ -178,7 +178,7 @@ This allows to store the token in an unique way." (defvar success) ;;;###autoload -(defun oauth2-url-retrieve-synchronously (token url) +(defun oauth2-url-retrieve-synchronously (token url &optional request-method request-data request-extra-headers) "Retrieve an URL synchronously using TOKENS to access it. TOKENS can be obtained with `oauth2-auth'." (let (tokens-need-renew) @@ -187,10 +187,14 @@ TOKENS can be obtained with `oauth2-auth'." ;; This is to make `url' think ;; it's done. (setq success t))) - (let ((url-buffer (url-retrieve-synchronously - (oauth2-url-append-access-token token url)))) + (let ((url-request-method request-method) + (url-request-data request-data) + (url-request-extra-headers request-extra-headers) + (url-buffer)) + (setq url-buffer (url-retrieve-synchronously + (oauth2-url-append-access-token token url))) (if tokens-need-renew - (oauth2-url-retrieve-synchronously (oauth2-refresh-access token) url) + (oauth2-url-retrieve-synchronously (oauth2-refresh-access token) url request-method request-data request-extra-headers) url-buffer))))) (provide 'oauth2) |