Page 1 of 1

Axios-Anfrage „ausstehend“ im Chrome Dev Tool

Posted: 11 Jan 2025, 13:13
by Guest
In meinem Projekt führe ich eine GET-Anfrage (Axios) durch und erhalte die Daten, die ich benötige.
Mein Problem: In Chrome Dev Tools (Registerkarte „Netzwerk“) der Status der Anfrage ist immer „ausstehend“. Wenn ich andererseits den Status der Antwort in der Konsole protokolliere, ist er 200 (Code unten).
Irgendwelche Ideen, was hier falsch ist?

Code: Select all

(async (city, country)=>{
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);
});
})("Berlin", "Germany");