curl -v -u : https://url/ \ -H 'content-type: application/json' \ -d '{"destination": ["to"], \ "source": "from", \ "text": "Sent from curl"}' #### $to = "John"; $from = "John"; $msg = "Hi Man"; my $url = "https://url"; my $json = encode_json { destination => $to, source => $from, text => $msg, }; my $http = HTTP::Tinyish->new( default_headers => { AUTH_ID => '9eafe236623bf2b5c2357d43333d3bba77ceed71', AUTH_TOKEN => '9eafe236623bf2b5c2357d43333d3bba77ceed71', } ); my $response = $http->post( $url => { content => $json, headers => { 'Content-Type' => 'application/json' }, }); $reponr = ( decode_json $response->{'content'} ); print "$reponr\n";