From: Chris Tallon Date: Mon, 12 Mar 2018 14:36:18 +0000 (+0000) Subject: Add content type response header for POST json X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=75f3a90fa7c35c366513003f30ac65e1c887a04a;p=jsonserver.git Add content type response header for POST json --- diff --git a/httpdclient.c b/httpdclient.c index 7a25abc..81641f6 100644 --- a/httpdclient.c +++ b/httpdclient.c @@ -280,6 +280,7 @@ int HTTPDClient::processPOST() if (!success) return sendStockResponse(500); struct MHD_Response* response = MHD_create_response_from_buffer(strlen(returnData.c_str()), (void *)returnData.c_str(), MHD_RESPMEM_MUST_COPY); + MHD_add_response_header(response, "Content-Type", "application/json"); int ret = MHD_queue_response(mhd_connection, MHD_HTTP_OK, response); MHD_destroy_response(response); return ret;