sendMessage() doesn't work - HTTP response code: -1

I want an ESP32 with two DS18B20 via DS2482 (I2C) to measure the temperature and send an alarm via WhatsApp. I tested sending messages and it works, but it doesn't work together with temperature measurement. The network settings are identical. I get an error message: "HTTP response code: -1"
Why doesn't it work together with measurement and what does the code -1 mean?
Thanks in advance.

"-1" is not an HTTP response... as seen here...

Poking around the internet, something about two items called HTTPClient and HttpClient - one refuses to accept the input intended for the other.

Thank you for your reply. I thought the problem was because I also have AsyncWebServer in the program, but it doesn't work even when I delete all the code except setting up the network and sending the message. I set fixed settings for the network. Is there a problem? When I connect to a network without default settings, sending messages works. Maybe I'm wrong with the PrimaryDNS and SecondaryDNS settings?

Apparently I chose the wrong DNS servers and that's why sending messages didn't work. With PrimaryDNS 8.8.8.8 and SecondaryDNS 8.8.4.4 works fine.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.