Help for this page

Select Code to Download


  1. or download this
    use v5.14;
    use CGI ();
    ...
    
    print $q->header("application/json");
    print $json->encode({ c => $c });
    
  2. or download this
    use v5.14;
    use HTTP::Tiny ();
    ...
    my $response = $http->post(@request);
    my $output   = $json->decode($response->{content});
    say $output->{c};