diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-11-17 16:50:15 +0000 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-11-17 16:50:15 +0000 |
commit | 278fa010e6a63474fce6bf46aaf3327b0d9cf7f7 (patch) | |
tree | 3194014d9405945406a31885915f3d15d8d361f3 /sx-auth.el | |
parent | 329cd7a67415f3c0092497ebdb714d3446819175 (diff) | |
parent | 97eee0eae60c97bdab1361edb39dbac57c3dc6e5 (diff) |
Merge pull request #52 from jleechpe/sx-request-make-update
Updated `sx-request-make` to use a consistent format for both `POST` and `GET` methods
Diffstat (limited to 'sx-auth.el')
-rw-r--r-- | sx-auth.el | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -28,7 +28,7 @@ (require 'sx-cache) (defconst sx-auth-root - "https://stackexchange.com/oauth/") + "https://stackexchange.com/oauth/dialog") (defconst sx-auth-redirect-uri "http://vermiculus.github.io/stack-mode/auth/auth.htm") (defconst sx-auth-client-id @@ -50,15 +50,17 @@ questions)." (interactive) (setq sx-auth-access-token - (let ((url (sx-request-build - "dialog" - `((client_id . ,sx-auth-client-id) - (scope . (read_inbox - no_expiry - write_access)) - (redirect_uri . ,(url-hexify-string - sx-auth-redirect-uri))) - "," sx-auth-root))) + (let ((url (concat + sx-auth-root + "?" + (sx-request--build-keyword-arguments + `((client_id . ,sx-auth-client-id) + (scope . (read_inbox + no_expiry + write_access)) + (redirect_uri . ,(url-hexify-string + sx-auth-redirect-uri))) + ",")))) (browse-url url) (read-string "Enter the access token displayed on the webpage: "))) (if (string-equal "" sx-auth-access-token) |