Hi!
I’m trying to pass JSON data into my particle function and I am routinely blowing past the 63 character limit for String passed into the function.
I can limit this value in my web app, but it would also be nice to have device-end validation. Right I have something more/less like this:
Particle.function("do-something", doSomethingHandler)
...
int doSomethingHandler(String response)
{
Serial.println(response);
return 1;
}
When I send too much data, the response
that is outputted is that data that was last sent on the device. Even if it was from a separate function. How can I tell that the response is too large so that I can return -1 at the end of the function call?
Thanks in advance!