Open ms-somanna opened 5 months ago
You can use HTTPClient::errorToString() to turn that into a text response. In this case it is a read timeout, most likely when waiting for the server to give you a response. Google can certainly be slow. Use setTimeout to increase the timeout, default is 5000 (ms).
OP gave a thumbs up to this (very good) answer, but didn't close the issue. It doesn't seem like there's any remaining open action here.
Should this perhaps be closed?
Board
ESP32 Dev Board
Device Description
Custom Dev Board
Hardware Configuration
The following modules are attached to the board.
Version
latest master (checkout manually)
IDE Name
Arduino IDE
Operating System
Windows 11
Flash frequency
40 Mhz
PSRAM enabled
yes
Upload speed
115200
Description
I'm fetching energy meter data from the RS485 module, converting it to Json objects and sending the Json data as payload in a http post request to Google Sheets. I'm using the HTTP status code returned by
HTTP.GET()
function to check if the request was successful or not. The problem is sometimes even after successfully adding the json data to google sheets, the http status code returned is -11. This obviously leads to assuming the request failed even though it succeeded.Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide