aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-08-07 18:17:39 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-08-07 19:28:11 +0200
commite59ced7c51403a1f8fb7b312dccfa1516162637a (patch)
tree06e660643b739ad568adf872b356c5b01467d937 /lisp
parenta44de346afbce43e4cd0d79280a45e2d2cd68758 (diff)
restore (list (cons call in macro
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-http.el38
1 files changed, 19 insertions, 19 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 48046c2..8c55534 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -102,8 +102,8 @@ Message status and JSON error from RESPONSE if unsuccessful."
`(let ((url-request-method ,method)
(url-request-extra-headers
(unless ,unauthenticated-p
- (("Authorization"
- (concat "Bearer " (mastodon-auth--access-token)))))))
+ (list (cons "Authorization"
+ (concat "Bearer " (mastodon-auth--access-token)))))))
,body))
(defun mastodon-http--post (url args headers &optional unauthenticated-p)
@@ -112,23 +112,23 @@ Message status and JSON error from RESPONSE if unsuccessful."
Authorization header is included by default unless UNAUTHENTICATED-P is non-nil."
(mastodon-http--authorized-request
"POST"
- (let ((url-request-data
- (when args
- (mapconcat (lambda (arg)
- (concat (url-hexify-string (car arg))
- "="
- (url-hexify-string (cdr arg))))
- args
- "&")))
- (url-request-extra-headers
- (append url-request-extra-headers ; auth set in macro
- ;; pleroma compat:
- (unless (assoc "Content-Type" headers)
- '(("Content-Type" . "application/x-www-form-urlencoded")))
- headers)))
- (with-temp-buffer
- (mastodon-http--url-retrieve-synchronously url))
- unauthenticated-p)))
+ (let ((url-request-data
+ (when args
+ (mapconcat (lambda (arg)
+ (concat (url-hexify-string (car arg))
+ "="
+ (url-hexify-string (cdr arg))))
+ args
+ "&")))
+ (url-request-extra-headers
+ (append url-request-extra-headers ; auth set in macro
+ ;; pleroma compat:
+ (unless (assoc "Content-Type" headers)
+ '(("Content-Type" . "application/x-www-form-urlencoded")))
+ headers)))
+ (with-temp-buffer
+ (mastodon-http--url-retrieve-synchronously url)))
+ unauthenticated-p))
(defun mastodon-http--get (url)
"Make synchronous GET request to URL.