https://wizardly-nobel-49c92b.netlify.com/but when i try to do a get call in my request .url is" https://wizardly-nobel-49c92b.netlify.com/api.openweathermap.org/data/2.5/weather?q=burbank&units=metric&APPID=ac520234facdd7bb8b258738bac19fb9 "but needs to be thishttps:/api.openweathermap.org/data/2.5/weather?q=burbank&units=metric&APPID=ac520234facdd7bb8b258738bac19222i already changed the Environment variablesmy axios callconst search = evt => {if (evt.key === "Enter") {axios.get(`${api.base}weather?q=${query}&units=metric&APPID=${api.key}`).then(response => {setQuery('');setWeather(response.data);setClassName("app " + response.data.weather[0].main)console.log("hjkgfjgdsjgf", response);}).catch(function (error) {console.log(error);Swal.fire({icon: 'error',title: 'Oops...',text: 'Make sure location is spelled Correctly',})})}}
Submitted January 14, 2020 at 07:29PM by ddante93
No comments:
Post a Comment