From eba7c41c62c58e29ce32dfa515b948424a5f4c11 Mon Sep 17 00:00:00 2001 From: nemik Date: Mon, 5 Dec 2016 17:10:42 -0600 Subject: [PATCH] send the payload with the proper content-type as json --- user/httpclient.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user/httpclient.c b/user/httpclient.c index f43682c..6177446 100644 --- a/user/httpclient.c +++ b/user/httpclient.c @@ -148,7 +148,8 @@ static void ICACHE_FLASH_ATTR connect_callback(void * arg) if (req->post_data != NULL) { // If there is data this is a POST request. method = "POST"; os_sprintf(post_headers, - "Content-Type: application/x-www-form-urlencoded\r\n" + //"Content-Type: application/x-www-form-urlencoded\r\n" + "Content-Type: application/json\r\n" "Content-Length: %d\r\n", strlen(req->post_data)); }