instanceofMA / arduino-fetch

High level HTTP Request Library that gives a javascript fetch like API.
GNU General Public License v3.0
79 stars 11 forks source link

GET requests timeout unless the response ends with a \n #15

Open matthewturner opened 1 year ago

matthewturner commented 1 year ago

I noticed my GET requests were talking over 15 seconds. I tracked down the issue to the use of readStringUntil:

https://github.com/instanceofMA/arduino-fetch/blob/main/src/Fetch.cpp#L132

This never returns if the body ends in any other character. Perhaps this should read into a buffer based on the content length? I'll have a go at fixing the issue if you think it's the appropriate solution?