aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-14 19:09:27 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-15 10:41:19 +0100
commit370f0a8367e381345950e145554481d988a1709c (patch)
treee674d7d9d6751aef727a28676b998e12659e54dd /lisp/mastodon-http.el
parent7593590d5c7a1ea9824424cc46d0cad4130eb9b2 (diff)
make a start on lists
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r--lisp/mastodon-http.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 66707b7..e69a5c9 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -203,12 +203,15 @@ Callback to `mastodon-http--get-response-async', usually
(cons (car list) (cadr list))))
head-list)))
-(defun mastodon-http--delete (url)
+(defun mastodon-http--delete (url &optional args)
"Make DELETE request to URL."
- (mastodon-http--authorized-request
- "DELETE"
- (with-temp-buffer
- (mastodon-http--url-retrieve-synchronously url))))
+ (let ((url-request-data
+ (when args
+ (mastodon-http--build-query-string args))))
+ (mastodon-http--authorized-request
+ "DELETE"
+ (with-temp-buffer
+ (mastodon-http--url-retrieve-synchronously url)))))
(defun mastodon-http--append-query-string (url params)
"Append PARAMS to URL as query strings and return it.