For debugging purposes I want to delay all requests so that I can simulate that it actually takes time to load resources. I guess that this can be done in a interceptor somehow.
I do manage to delay single requests now with:
const delay =
milliseconds =>
new Promise(resolve =>
setTimeout(resolve, milliseconds));
delay(1000)
.then(() => {
axios.post(
...
).then((response) => {
...
});
});
But I would be more nice to do it for all requests at one place.