ESP8266WebServer read all POST data as raw string
Posted: Thu Jun 23, 2016 5:35 am
Hi everyone!
I want to POST a JSON object from my computer and parse it on the ESP8266. Eg:
If I POST the JSON object as a raw string from my computer using Google Postman to the ESP8266, how do I read that entire string in the ESP8266?
I'm able to step through .arg(i) and .argName(i), but that approach doesn't seem to handle nested objects (i.e.: "customPreset" above).
Andrew
I want to POST a JSON object from my computer and parse it on the ESP8266. Eg:
Code: Select all
{
"preset": "custom",
"brightness": 63,
"customPreset": {
"colour": "#BADA55",
"animation": "marching ants"
}
}
If I POST the JSON object as a raw string from my computer using Google Postman to the ESP8266, how do I read that entire string in the ESP8266?
I'm able to step through .arg(i) and .argName(i), but that approach doesn't seem to handle nested objects (i.e.: "customPreset" above).
Andrew