From 2a5700a46e3d66c049a757856f10eb039cc462fa Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 13 Oct 2023 11:12:33 +0200 Subject: http: build query str only when we have a value --- lisp/mastodon-http.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-http.el') 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) -- cgit v1.2.3