in reply to Mojo instead of curl
As already said, you need Mojo::UserAgent for such things in Perl, but you can also do it like this:
perl -Mojo -E "say g('https://my.webpage.com/my/path' =>\ { 'My-Header' => 'alfa', 'Me-Header-2' => 'beta' } => 'Hi!')->body"
|
|---|