My Open Weather Map API working fine on Postman but I'm getting errors while fetching it on the browser.
//fetching weather api
async getWeather() {
console.log("efsfs");
const response = await fetch('api.openweathermap.org/data/2.5/weather?q=London&appid=3f071776be6f7ccd417bfb1da2910---');
const responseData = await response.json();
return responseData;
}
//Using it
weather.getWeather()
.then(results => {
console.log(results)
})
.catch(err => console.error(err));
//Error
weather.js:11 GET http://127.0.0.1:5500/api.openweathermap.org/data/2.5/weather?q=London&appid=3f071776be6f7ccd417bfb1da2910859 404 (Not Found)