Axios-Anfrage „ausstehend“ im Chrome Dev ToolJavaScript

Javascript-Forum
Guest
 Axios-Anfrage „ausstehend“ im Chrome Dev Tool

Post 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");

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post