Skip to content

ESP8266 hangs when using HttpClient.getString  #6033

Closed
@saikiranmpr

Description

@saikiranmpr

Dear team, I have an issue with respect to getString() method. We are using ESP8266 where internet connection is little poor. Hence, after sending the HTTP POST request and when trying to read the response from the server, the ESP sometimes hangs and never comes out of it until hard reset is performed manually. This happens randomly. Kindly help me in resolving this. I am attaching the code below:

int httpCode = http.POST(postData);  
if (httpCode == 200 && http.getSize() > 0) {
    String payload = http.getString();    //Get the response payload
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions