fetch to curl Playground

Usually this library should be used together with a package manager like yarn or npm. (please refer to the README for general usage information)

Note the creation of the exports object in line 11 of this html file, which mitigates the missing module support of the browser.

How to use this playground

  • Check your browser console (usually opens with F12)
  • Try fetchToCurl("https://example.com", { headers: { "x-test": "test" }}) or console.log(fetchToCurl("https://example.com", { headers: { "x-test": "test" }})) in your browser console
  • Note that the you can compare with the real request in the network tab.