aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJohnson Denen <johnson.denen@gmail.com>2017-04-12 22:43:23 -0400
committerJohnson Denen <johnson.denen@gmail.com>2017-04-14 13:18:14 -0400
commit523bf47c32d52d9bc99912d901ec5e6708f21fa5 (patch)
treef08017dbc2ebe587eb13efcc2f7b828a5b0047e9 /lisp
parentb503c07c8480c8f57e72c3fdafa153ad9d47030f (diff)
Add GET function
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-http.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index aafef8a..91036be 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -109,5 +109,12 @@ If response code is not 2XX, switches to the response buffer created by `url-ret
(funcall success)
(switch-to-buffer (current-buffer))))
+(defun mastodon-http--get (url callback)
+ "Make GET request to URL.
+
+Pass response buffer to CALLBACK function."
+ (let ((url-request-method "GET"))
+ (url-retrieve url callback)))
+
(provide 'mastodon-http)
;;; mastodon-http.el ends here