From 75f3a90fa7c35c366513003f30ac65e1c887a04a Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Mon, 12 Mar 2018 14:36:18 +0000 Subject: [PATCH] Add content type response header for POST json --- httpdclient.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.39.2