Here's a screenshot of the response, including headers and all characters. As you can see, there are 10 zero bytes in the body. Arduino code for receiving and processing a stream after a successful server response:
Code: Select all
if(_httpResponseCode == 200) {
WiFiClient *stream = http.getStreamPtr();
int available = stream->available();
Serial.print("Available ");
Serial.println(available);
//Allocating memory for the response buffer
uint8_t* _result_bufer = new uint8_t[available];
//Reading all bytes from the stream and writing to the buffer
stream->readBytes(_result_bufer, available);
//Printing all received bytes to the console
for(int bytesRead = 0; bytesRead < available ; bytesRead++){
Serial.printf("%02X ", _result_bufer[bytesRead]);
}
_result = _result_bufer;
Serial.println();
Serial.print("Total bytes reads: ");
Serial.println(bytesRead);
}