curl -X POST https://api.geneea.com/v3/analysis \ -H 'Authorization: user_key ' \ -H 'Content-Type: application/json' \ -d '{"text": "The pizza in London was great!"}' #### #!/usr/bin/perl use warnings; use strict; my $user_key = '...'; use HTTP::Request::FromCurl; use LWP::UserAgent; my $req = 'HTTP::Request::FromCurl'->new(argv => [ -X => POST => 'https://api.geneea.com/v3/analysis', -H => "Authorization: user_key $user_key", -H => 'Content-Type: application/json', -d => '{"text": "The pizza in London was great!"}', ]); my $ua = 'LWP::UserAgent'->new; my $response = $ua->request($req->as_request); use Data::Dumper; print Dumper($response); #### JsonParseException: Unexpected character (\'\'\' (code 39)) #### '_content' => '\'{"text": "The pizza in London was great!"}\'', #### return sprintf "'%s'", $body