I have the following code:
getWeather = e => {
e.preventDefault();
const api_call = fetch(
`http://api.openweathermap.org/data/2.5/weather?q=London,uk&appid=${API_KEY}`
);
const data = api_call.json();
console.log(data);
};
But I keep getting .json() is not a function. Not sure why I am getting that.