Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 38
    Thank you for this. For anyone else wondering - you can just paste the fetch command directly in the Chrome console and replay the request. Commented Mar 23, 2019 at 0:41
  • 24
    You can use the following after the fetch to resolve the promise returned by fetch and view the response body (assuming it's JSON) .then(r => r.json()).then(json => console.log(json)) Commented Apr 17, 2019 at 19:18
  • 2
    For those who wonder where to paste the fetch code: paste and modify it on the console
    – Dotista
    Commented Jul 9, 2020 at 12:10
  • I needed to append .then(r => r.json()) to the fetch call to see the response on the network tab. Commented Jul 6, 2022 at 15:03