Api call not working

I am using a weather api to retrieve data however I am getting a 404. I am using postman as an api client and everything is returning ok. I am just wondering if I am implementing it wrong in my code…?

const getUserLocation = () => {
  let location = navigator.geolocation.getCurrentPosition((position) => {
    let longitude = position.coords.longitude;
    longitude = Math.round(longitude);
    let latitude = position.coords.latitude;
    latitude = Math.round(latitude);
    let apiKey = "thisisnotmykey";
    fetch(
      `api.openweathermap.org/data/2.5/weather?lat=${latitude}&lon=${longitude}&appid=${apiKey}`
    ).then((res) => {
      console.log(res);
    });
  });
};

Everything is coming back to postman fine with all the info I need however, it is throwing a 404 error in my browser…?

Ah!! thank you, I just copied the link from the docs and they didn’t have it in for some reason…

I dont suppose you have experienced something to do with ReadableStream…?
Trying to access the body off the response and all it says is Body: ReadableStream

Is it just that you aren’t parsing the response? eg:

.then((res) => res.json())
.then((res) => console.log(res))

If not, then:

And a tutorial on using it: