1

Pls how do I get the length of the following GET request

GET /data/2.5/weather?q=San%20Francisco,us HTTP/1.1\r\nHost: api.openweathermap.org\r\n\r\n\r\n

GET /api/weather/insert.php?temp=74.6&him=40.0 HTTP/1.1\r\nHost: symbiotictech.000webhostapp\r\n\r\n\r\n

Again my esp8266 unlink very quickly when Linking to my server (am using 000webhost...N/b: Free) but when I connect/link to other websites e.g openweather.org it stays longer and return response before unlinking, what should I do.

3
  • What do you "unlink very quickly"? You mean it disconnects before you get an answer? You have an extra \r\n which is not needed but I doubt that is the reason. Is your host correct? Are you connecting on the right port? Is there maybe a mixup between TLS and no TLS? Is the webservice correctly answering when using e.g. curl? Also if you webservice actually inserts data, it must not be a GET. It must be a POST or possibly a PUT.
    – jcaron
    Sep 2, 2020 at 14:46
  • Ok. I will try POST, but I have actually used GET for other websites without issues, and I think the host, port and everything is correct, I also used POSTMAN and it worked....
    – Onyeka
    Sep 2, 2020 at 16:16
  • I thought you had changed the Host in your second request, but you really just missed the .com at the end, didn't you?
    – jcaron
    Sep 3, 2020 at 8:05

0

Browse other questions tagged or ask your own question.