From a5b33ac76e81681864ab74e2c62e4e66734db647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Kn=C3=B6rig?= Date: Tue, 9 Nov 2021 20:21:37 +0100 Subject: [PATCH] [docs] use correct json mime type If it's not `application/json`, some servers will not parse it properly into json (as in my case, the nodejs express.json() middleware) --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 842c7633..7e91ccbf 100644 --- a/docs/index.md +++ b/docs/index.md @@ -86,9 +86,9 @@ RestClient::Response r = conn->head("/get") RestClient::Response r = conn->del("/delete") // set different content header for POST and PUT -conn->AppendHeader("Content-Type", "text/json") +conn->AppendHeader("Content-Type", "application/json") RestClient::Response r = conn->post("/post", "{\"foo\": \"bla\"}") -RestClient::Response r = conn->put("/put", "text/json", "{\"foo\": \"bla\"}") +RestClient::Response r = conn->put("/put", "application/json", "{\"foo\": \"bla\"}") // deinit RestClient. After calling this you have to call RestClient::init() // again before you can use it