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?
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?
Share Improve this question asked Mar 20, 2017 at 16:28 Max FavilliMax Favilli 6,4493 gold badges43 silver badges64 bronze badges 4- 2 Not yet implemented, apparently: crbug.com/573371 – woxxom Commented Mar 20, 2017 at 16:34
- 2 FWIW unless you utilize the ability to process data streams, what features of Fetch API do you need that you can't have in a promisified XHR? Also I don't like there's no way to cancel a fetch request. – woxxom Commented Mar 20, 2017 at 16:38
- What else do you use? I could promisify xhr but since there's fetch and it's a standard in browser I thought was a good idea to use it. Before I was using angular $http and before that jquery.ajax, but now I moved to reactjs and thought fetch is a good substitute. – Max Favilli Commented Mar 21, 2017 at 18:36
- @wOxxOm wow, can't believe it – Max Favilli Commented Mar 21, 2017 at 18:37
2 Answers
Reset to default 14Well, 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
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.