aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-10 10:25:52 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-10 10:25:52 +0100
commita19588719ccf0ec35d22acdf2ce349a5ef499691 (patch)
treebad86d8e314968efab0e551a7d047104294da1b0 /lisp
parent04ba8ebdf01b07331340f4c1e8f14987156a0cf8 (diff)
http docstrings
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-http.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 36d53c9..0866248 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -151,7 +151,7 @@ SILENT means don't message."
(defun mastodon-http--get-response (url &optional no-headers silent)
"Make synchronous GET request to URL. Return JSON and response headers.
SILENT means don't message.
-HEADERS means also return http response headers."
+NO-HEADERS means don't collect http response headers."
(with-current-buffer (mastodon-http--get url silent)
(mastodon-http--process-response no-headers)))
@@ -162,13 +162,16 @@ SILENT means don't message."
(defun mastodon-http--process-json ()
"Return only JSON data from async URL request.
-Callback to `mastodon-http--get-json-async', usually `mastodon-tl--init*', is run on the result."
+Callback to `mastodon-http--get-json-async', usually
+`mastodon-tl--init*', is run on the result."
(car (mastodon-http--process-response :no-headers)))
(defun mastodon-http--process-response (&optional no-headers)
"Process http response.
Return a cons of JSON list and http response headers.
-Callback to `mastodon-http--get-response-async', usually `mastodon-tl--init*', is run on the result."
+If NO-HEADERS is non-nil, just return the JSON.
+Callback to `mastodon-http--get-response-async', usually
+`mastodon-tl--init*', is run on the result."
;; view raw response:
;; (switch-to-buffer (current-buffer))
(let ((headers (unless no-headers