HTTP Client fails when instantiated locally rather than globally #156
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
When you put the instantiation of the ArduinoHttpClient in the loop or in any function, the client often fails to finish the request. It will make the HTTP call, and the server will acknowledge it, but then nothing happens until timeout.
Tested on Nano RP2040 (for WiFiNINA) and Uno R4 WiFi.
It fails for both HTTP and HTTPS, using the steps below:
To reproduce this, using Examples -> SimpleGet:
serverAddress
(line 21) to "www.arduino.cc" or any test serverport
(line 22) to 80SECRET_SSID
andSECRET_PASS
inarduino_secrets.h
for your networkHttpClient client =
etc. to the first line of theloop()
function (line 49)To test HTTPS, change
WiFiClient
instantiation on line 24 toWiFiSSLClient
, and changeport
to 443.The text was updated successfully, but these errors were encountered: