#!perl use strict; use warnings; use WWW::Mechanize; use HTTP::Request; my $ua = WWW::Mechanize->new(); my $r = HTTP::Request->new( 'GET' => 'https://example.com/', [ 'Accept' => '*/*', 'Accept' => 'application/json', 'Authorization' => '', 'Host' => 'example.com:443', 'User-Agent' => 'curl/7.55.1', ], ); my $res = $ua->request( $r, ); __END__ Created from curl command line curl -X GET "https://example.com" -H "accept: application/json" -H "authorization:"