Closed ersivv closed 5 years ago
Take a look at the sample that I posted in response to issue #9. In that sample you could just as well use onData() instead of onReadyStateChange. Doing so would look like:
void requestCB(void* optParm, asyncHTTPrequest* request, int len){
Serial.println(request->responseText());
Serial.println();
request->setDebug(false);
}
So you would not be looking for readyState == 4; The difference is that if it were a long or chunked response, there would be multiple calls to onData. The result in this case should be the same.
Hi. How to use onData() callback function?