Closed hansfeenstra1997 closed 6 years ago
Hi,
It is very likely to be caused by a wrong input.
I'm not familiar with ESP8266HTTPClient
.
Does the result of http.getString()
include the headers?
Are you sure that Chunked Transfer Encoding is disabled or handled by the library?
Please check Why parsing fails?, your answer is there.
Regards, Benoit
Hello,
The result of http.getString() does not include headers. It contains the result from the get request: "{switch_id":1, "status":1}".
Chunked transfer encoding is handled by the library. I searched on the "Why parsing fails" page. And I can't find the solution for this.
Regards, Hans
This is not a valid JSON document, a quote is missing
{switch_id":1, "status":1}"
The code works after adding the missing quote. Demo: https://wandbox.org/permlink/jjgyAWUEZwcgseGJ
I see, thank you!
Thanks for your support.
Can i put my code as an example on your page. I work with a WiFi module, maybe other people also want to try it. For a combination for IOT.
@hansfeenstra1997, feel free to add a link to your project in the wiki
include
include
include
include
include
define USE_SERIAL Serial
ESP8266WiFiMulti WiFiMulti;
void setup() {
}
void loop() {
}
Input json string from get: {switch_id":1, "status":1}