aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-08-05 20:01:09 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-08-05 20:01:09 +0200
commit649887d61818bf6acc19a1b426dcd915f53dbcdd (patch)
tree264ed4c599441f02410ac0f97f22cb6f2b4e9e5b /lisp/mastodon-http.el
parentfb22826e6093f6ca334d61935cf2d926635ab1bc (diff)
http: move concat params to url
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r--lisp/mastodon-http.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index d6abac4..51b144e 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -137,6 +137,13 @@ Used for API form data parameters that take an array."
(cl-loop for x in array
collect (cons param-str x)))
+(defun mastodon-http--concat-params-to-url (url params)
+ "Build a query string with PARAMS and concat to URL."
+ (if params
+ (concat url "?"
+ (mastodon-http--build-params-string params))
+ url))
+
(defun mastodon-http--post (url
&optional params headers unauthenticated-p json)
"POST synchronously to URL, optionally with PARAMS and HEADERS.
@@ -165,13 +172,6 @@ the request data. If it is :raw, just use the plain params."
(mastodon-http--url-retrieve-synchronously url)))
unauthenticated-p))
-(defun mastodon-http--concat-params-to-url (url params)
- "Build a query string with PARAMS and concat to URL."
- (if params
- (concat url "?"
- (mastodon-http--build-params-string params))
- url))
-
(defun mastodon-http--get (url &optional params silent)
"Make synchronous GET request to URL.
PARAMS is an alist of any extra parameters to send with the request.