From 8567cc6014399259bf6efa5574f0ac7e98e70094 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Sat, 9 Feb 2019 01:32:44 +0100 Subject: [PATCH 3/3] Set the Content-Type header on POST, otherwise stuff breaks --- src/core/net/http/impl/curl/client.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/net/http/impl/curl/client.cpp b/src/core/net/http/impl/curl/client.cpp index ba68cda..f49ce67 100644 --- a/src/core/net/http/impl/curl/client.cpp +++ b/src/core/net/http/impl/curl/client.cpp @@ -158,9 +158,12 @@ std::shared_ptr http::impl::curl::Client::post_impl( const std::string& ct) { ::curl::easy::Handle handle; + http::Header ctheader; + ctheader.set("Content-Type", ct); handle.method(http::Method::post) .url(configuration.uri.c_str()) .header(configuration.header) + .header(ctheader) .post_data(payload.c_str(), ct); handle.set_option(::curl::Option::ssl_verify_host, -- 2.20.1