Paste your fetch() command here

Switch to Curl input - Switch to wget input

Headers to Curl

Resulting Perl code

Copy to clipboard
#!perl use strict; use warnings; use HTTP::Tiny; my $ua = HTTP::Tiny->new( 'verify_SSL' => '1' ); my $res = $ua->request( 'GET' => 'https://example.com', { headers => { }, }, ); __END__ Created from fetch() command fetch("https://example.com", { "method":"GET" })

Instructions

Screenshot of where to click

These instructions work for Firefox, Google Chrome and maybe also Safari.

  1. Open the Network tab in the DevTools (by pressing F12 for example)
  2. Right-click a request
  3. Click "Copy" > "Copy as Fetch"
  4. Paste it in the text box above
  5. Look at the generated code

Powered by