Skip to content

Commit

Permalink
send the payload with the proper content-type as json
Browse files Browse the repository at this point in the history
  • Loading branch information
nemik committed Dec 5, 2016
1 parent 4c35f0a commit eba7c41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion user/httpclient.c
Expand Up @@ -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));
}

Expand Down

0 comments on commit eba7c41

Please sign in to comment.