The use of the ESP8266 in the world of IoT

User avatar
By davydnorris
#87547 Do you need both versions? XHTTP is the lowest common denominator, whereas fetch isn't supported on IE 11.

If you use the Web Console in your browser, you can see the requests and response to each network call. This will tell you whether the response is coming back to the browser or not.

You can also change the code to log the response object itself and see the detail in the browser console:

Code: Select allfetch("HTTP://192.168.1.80/temperature")
.then(response => {
  console.log(response);
  return response.json();
})
.then(data => {alert('Success:', data[0])});