In my project I’m doing a GET request (axios) and I’m getting the data I need.
My problem: In Chrome Dev Tools (Network tab) the status of the request is always “pending”. On the other hand, when I console.log the status of the response, it’s 200 (code below).
Any ideas what is wrong here?
await axios({
method: "get",
url: `https://nominatim.openstreetmap.org/search?city=${city}&country=${country}&limit=1&format=json`,
headers: {
"Content-Type": "application/json; charset=utf-8",
},
})
.then(function (response) {
console.log(response.data);
console.log(response.status);
console.log(response.statusText);
});