#!perl use strict; use warnings; use HTTP::Tiny; my $ua = HTTP::Tiny->new( 'verify_SSL' => '1' ); my $res = $ua->request( 'POST' => 'https://api-free.deepl.com/v2/translate', { headers => { 'Authorization' => 'DeepL-Auth-Key redacted', 'Content-Length' => '37', 'Accept' => '*/*', 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => 'curl/7.55.1' }, content => "text=Hello\x252C\x2520world!&target_lang=DE" }, ); __END__ Created from curl command line curl -X POST 'https://api-free.deepl.com/v2/translate' -H 'Authorization: DeepL-Auth-Key redacted' -d 'text=Hello%2C%20world!' -d 'target_lang=DE'