Open koulombus opened 6 years ago
@cawena what if you add a client.stop()
before the wait?
In the future if would be valuable to get the entire sketch you are using, as well as the hardware you are using.
Can anyone shed any light on this? I'm also experiencing almost a second of latency on decoding the response and status code
@georgeveysSFL
try this:
in "HttpClient.h" go to this entry, change the kHttpWaitForDataDelay
from 1000 to 100:
// Number of milliseconds that we wait each time there isn't any data
// available to be read (during status code and header processing)
static const int kHttpWaitForDataDelay = 100;
The one second latency comes from the code running through too quickly, so there is no response to be collected yet. This triggers a 1000ms Delay. If you don't want to mess with the library, you could also add a sufficient wait before trying to access the response in your code.
This is fixed in below PR https://github.com/arduino-libraries/ArduinoHttpClient/pull/125 However, the time could be reduced even more, the client tries several times until data is returned.
Hi,
I use the sample "SimpleGet" to get a UUID from a server.
The output show me a very long time on getting the status code.
Here the code...
is there something wrong with this simple code?