Multibyte payload works now

This commit is contained in:
Miguel de la Cruz 2022-06-02 14:33:56 +02:00
parent 44fb954ef9
commit ac63ec4580

View file

@ -132,7 +132,7 @@ if the user is not present"
"Builds a Mattermost request and returns the JSON response" "Builds a Mattermost request and returns the JSON response"
(let ((url-request-method method) (let ((url-request-method method)
(url-request-extra-headers `(("Content-Type" . "application/json"))) (url-request-extra-headers `(("Content-Type" . "application/json")))
(url-request-data (if body (json-serialize body)))) (url-request-data (if body (encode-coding-string (json-serialize body) 'utf-8))))
(if mattermost-token (if mattermost-token
(add-to-list 'url-request-extra-headers `("Authorization" . ,(concat "Bearer " mattermost-token)))) (add-to-list 'url-request-extra-headers `("Authorization" . ,(concat "Bearer " mattermost-token))))
(with-current-buffer (url-retrieve-synchronously (concat "https://" mattermost-host "/api/v4" url) t) (with-current-buffer (url-retrieve-synchronously (concat "https://" mattermost-host "/api/v4" url) t)