From c5a3c917712283d733971dba2ad39486f82bb6e4 Mon Sep 17 00:00:00 2001 From: mousebot Date: Thu, 6 May 2021 19:21:29 +0200 Subject: add delete toot function --- lisp/mastodon-http.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lisp/mastodon-http.el') diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el index 7be4467..b590bf0 100644 --- a/lisp/mastodon-http.el +++ b/lisp/mastodon-http.el @@ -98,6 +98,17 @@ Pass response buffer to CALLBACK function." (mastodon-auth--access-token)))))) (url-retrieve-synchronously url))) +(defun mastodon-http--delete (url) + "Make GET request to URL. + +Pass response buffer to CALLBACK function." + (let ((url-request-method "DELETE") + (url-request-extra-headers + `(("Authorization" . ,(concat "Bearer " + (mastodon-auth--access-token)))))) + (with-temp-buffer + (url-retrieve-synchronously url)))) + (defun mastodon-http--get-json (url) "Make GET request to URL. Return JSON response vector." (let ((json-vector -- cgit v1.2.3