diff --git a/mattermost.el b/mattermost.el index c59e25c..e0993cc 100644 --- a/mattermost.el +++ b/mattermost.el @@ -40,7 +40,7 @@ (defun mattermost-login (username password) "Log into the Mattermost Server" (let ((url-request-method "POST") - (url-request-extra-headers `(("Content-Type" . "application/json"))) + (url-request-extra-headers '(("Content-Type" . "application/json"))) (url-request-data (json-serialize (list :login_id username :password password)))) (with-current-buffer (url-retrieve-synchronously (concat mattermost-server-url "/api/v4/users/login")) (beginning-of-buffer) @@ -59,7 +59,7 @@ (url-request-extra-headers `(("Content-Type" . "application/json"))) (url-request-data (if body (json-serialize body)))) (if mattermost-token - (add-to-list 'url-request-extra-headers (cons "Authorization" (concat "Bearer " mattermost-token)))) + (add-to-list 'url-request-extra-headers `("Authorization" . ,(concat "Bearer " mattermost-token)))) (with-current-buffer (url-retrieve-synchronously (concat mattermost-server-url "/api/v4" url) t) (mattermost-parse-json))))