From 523bf47c32d52d9bc99912d901ec5e6708f21fa5 Mon Sep 17 00:00:00 2001 From: Johnson Denen Date: Wed, 12 Apr 2017 22:43:23 -0400 Subject: Add GET function --- lisp/mastodon-http.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lisp') 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 -- cgit v1.2.3