From ac63ec4580df02fe81aad553e76639f373b06ec2 Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Thu, 2 Jun 2022 14:33:56 +0200 Subject: [PATCH] Multibyte payload works now --- mattermost.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mattermost.el b/mattermost.el index b4e500b..926aadc 100644 --- a/mattermost.el +++ b/mattermost.el @@ -132,7 +132,7 @@ if the user is not present" "Builds a Mattermost request and returns the JSON response" (let ((url-request-method method) (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 (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)