-
Notifications
You must be signed in to change notification settings - Fork 13.3k
http.getString() return blank #7692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is an area for issues with the Arduino/esp8266 core files and included libraries. The issue template that you've ignored clearly states that "how do I..." questions are for the arduino.cc or esp8266.com forums, not here. |
I'm in right place |
Your code works well with current master. |
I get
|
There is no |
it's a gateway |
I reproduced the issue and while trying to fix I realized it already is in #6979. |
Hi, I'm sending some GET requests and reading the response with http.getString(). For all the requests I get 200 as a respose code but for some of them http.getString() return blank. Testing requests with curl everything works properly. The big difference between the requests is the payload size, I noticed that if the payload is large http.getString() return blank. At the moment I don't know exactly after what size this behavior occurs and if really the problem is the size. Testing requests with curl I have also identified the size of the payloads:
Is this possible? Any suggestions? At the moment i'm not using Thanks |
If you can get a 9500 bytes long answer maybe this protocol should be revised ?
const String& payload = http.getString();
ESP.setIramHeap();
const String& payload = http.getString();
ESP.resetHeap(); (check example)
|
I know, this is Off-Topic to the issue, but to anybody finding this via google.. don't |
For those who ended up here, when // String payload = http.getString();
WiFiClient * stream = http.getStreamPtr();
String payload = "";
while (stream->available()) {
char c = stream->read();
payload += c;
} |
interesting that this solution works when my esp8266 does a GET from an external website, but when one esp tries to serve that same file (json string) to another esp, the stream pointer solution returns nothing; whereas the getString() way DOES work. really weird. trying to understand why this is. |
Hi
I have a simple code that read a json and display result on lcd.
After some month I resumed it but I think that some update (Arduino CLI o other) give me a problem with http.getString() that return empty string.
To do a simple test I did an empty project with only wifi connection http request.
Here my code:
when I trace it get
Has you can see the payload is empty/blank.
Any suggestion for me?
Thanks
The text was updated successfully, but these errors were encountered: