#!/usr/bin/perl -w BEGIN { print "Content-type: text/plain\n\n"; } use lib '.'; use HTTP::Tinyish; use Time::HiRes qw(time); my $url = "https://localbitcoins.com/api/merchant/new_invoice/"; my $headers = { Apiauth-Key => 'sdfsdf', Apiauth-Nonce => 'sdfsdf', Apiauth-Signature => 'sdfsdf', 'Content-Type' => 'application/x-www-form-urlencoded' }; my $content = ( currency => 'USD', amount => '500', description => 'hey', internal => '0', ); my $http = HTTP::Tinyish->new(); my $response = $http->post( $url => { content => $content, headers => $headers, }); if ($response->{success}) { my $output = $response->{content}; print "$output\n"; } else { print "failure: $response->{status}\n"; }