From 53b3ffac39ffb72321352bcafb2eb4ad1a3d4020 Mon Sep 17 00:00:00 2001 From: clwgg Date: Thu, 1 Jul 2021 21:05:43 +0200 Subject: [PATCH] Add JSON Content-Type to POST header FastAPI introduced Content-Type checking in v0.65.2 (see https://github.com/tiangolo/fastapi/pull/2118) --- anaconda-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/anaconda-mode.el b/anaconda-mode.el index 142615b..9d1ea4c 100644 --- a/anaconda-mode.el +++ b/anaconda-mode.el @@ -382,6 +382,7 @@ Apply CALLBACK to the call result when retrieve it. Remote COMMAND must expect four arguments: python buffer content, line number position, column number position and file path." (let ((url-request-method "POST") + (url-request-extra-headers `(("Content-Type" . "application/json"))) (url-request-data (anaconda-mode-jsonrpc-request command))) (url-retrieve (format "http://%s:%s" anaconda-mode-localhost-address (anaconda-mode-port))