Reputation: 6449
In chrome developer tools is very useful to "replay xhr" for a xhr request (network tab). I have started using fetch in my code, and chrome developer tools do not allow to "replay" a fetch request, how is can it be? Am I doing something wrong?
Upvotes: 19
Views: 7723
Reputation: 1130
It's not ideal, but you can right-click on the request, select copy -> "copy as fetch", then paste and execute in the console. Why can't that happen with a single click in the context menu (in 2024)? idk.
Upvotes: 2
Reputation: 6449
Well, seems it's not supported yet. It's a real disappointment because "replay" is just too useful to stop using it.
So I followed @wOxxOm advice and I just created a promised version of the standard xhr: https://github.com/max-favilli/helper-xhr
Upvotes: 14