From a3240ad2bfb0d6e3329e0a4c37b4377de44f4ac6 Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Tue, 16 Mar 2021 17:19:38 -0700 Subject: [PATCH] cli tool: add Content-Type application/json See Issue #1209 --- src/bitcoin-cli.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 18c8ffa38c896..d0bcc69c91f53 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -353,6 +353,7 @@ static UniValue CallRPC(BaseRequestHandler *rh, const std::string& strMethod, co assert(output_headers); evhttp_add_header(output_headers, "Host", host.c_str()); evhttp_add_header(output_headers, "Connection", "close"); + evhttp_add_header(output_headers, "Content-Type", "application/json"); evhttp_add_header(output_headers, "Authorization", (std::string("Basic ") + EncodeBase64(strRPCUserColonPass)).c_str()); // Attach request data