use LWP::UserAgent; my $ua = LWP::UserAgent->new( 'send_te' => '0' ); my $r = HTTP::Request->new( 'POST' => 'https://www.toptal.com/developers/cssminifier/raw', [ 'Accept' => '*/*', 'User-Agent' => 'curl/7.55.1', 'Content-Type' => 'application/x-www-form-urlencoded' ], "input=p { color : red; }" ); my $minified_css = $ua->request( $r, )->decoded_content(); print $minified_css;
Click on the language of your choice to see an example: