]> git.vomp.tv Git - jsonserver.git/commitdiff
Add content type response header for POST json
authorChris Tallon <chris@vomp.tv>
Mon, 12 Mar 2018 14:36:18 +0000 (14:36 +0000)
committerChris Tallon <chris@vomp.tv>
Mon, 12 Mar 2018 14:36:18 +0000 (14:36 +0000)
httpdclient.c

index 7a25abcb6695e244aea72d266e71f7b708a1432b..81641f669f8ae382801868e94cca2c5582a35636 100644 (file)
@@ -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;