Can't get HTTP information #566
-
This is maybe not directly related to Autoconnect but I hope you can help anyway. Code: //for display //DISPLAY int x,minX; //AUTOCONNECT //Webside fra ESP //SKRIV NTP TID //SÆT TIDSZONE //HENT NTP TID Serial.println("Setting up time"); void setup() { //AUTOCONNECT //FORBIND WIFI //hent NTP tid //hent klub navn
} void loop() { //Hent lokal NTP fra ESP //vis rulletekst } The homepage returns "Demo klub". Serial Monitor returns: I have an "Error code -5". What does this mean? Can you see what I have done wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Code on this page works: https://randomnerdtutorials.com/esp32-http-get-post-arduino/ So I need to change something in the code to make it work with Autoconnect. Hope that you plz can help a novice. |
Beta Was this translation helpful? Give feedback.
-
It is obvious that there is an error in If you need more detailed information, specify a verbose Core Debug Level in the Tools menu of the Arduino IDE. This error is not related to AutoConnect. You are issuing a request with HTTPS, but the code does not contain a certificate. BasicHttpsClinent.ino of ESP32 Arduino core's HTTPClient library has an example for applying the https. Before applying AutoConnect, I recommend following BasicHttpsClinent.ino example to experience how to apply HTTPClient over HTTPS.
That tutorial means little to nothing for the use case of using HTTPClient for HTTPS. |
Beta Was this translation helpful? Give feedback.
It is obvious that there is an error in
http.GET()
, which I think you are seeing as well. Since it is your code.So your question about the meaning of the Error code, you can find it in the source code of the HTTPClient library.
https://github.com/espressif/arduino-esp32/blob/23d715af1b185fac21558c907af4ff5b86526aa4/libraries/HTTPClient/src/HTTPClient.h#L49
If you need more detailed information, specify a verbose Core Debug Level in the Tools menu of the Arduino IDE.
This error is not related to AutoConnect. You are issuing a request with HTTPS, but the code does not contain a certificate. BasicHttpsClinent.ino of ESP32 Ardu…