diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-10-13 11:12:33 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-10-13 11:12:33 +0200 |
commit | 2a5700a46e3d66c049a757856f10eb039cc462fa (patch) | |
tree | a7c745e4db40359fde95bd4bf26c86a691df1e9c | |
parent | 9aa6a50e095b08bbaf64566a7661ddf0a1880b5d (diff) |
http: build query str only when we have a value
-rw-r--r-- | lisp/mastodon-http.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el index 94a24fc..8741972 100644 --- a/lisp/mastodon-http.el +++ b/lisp/mastodon-http.el @@ -118,8 +118,9 @@ Unless UNAUTHENTICATED-P is non-nil." ;; url-build-query-string adds 'nil' for empty params so lets stick with our ;; own: (mapconcat (lambda (p) - (concat (url-hexify-string (car p)) - "=" (url-hexify-string (cdr p)))) + (when (cdr p) ; only when value + (concat (url-hexify-string (car p)) + "=" (url-hexify-string (cdr p))))) params "&")) (defun mastodon-http--build-array-params-alist (param-str array) |