in reply to http header

Since HTTP::Tinyish is a wrapper over LWP, why not go with LWP directly?

my $browser = LWP::UserAgent->new();

my $header = HTTP::Headers->new(
                      Content_Type        => 'application/json',           
                      'api-key'=>"jhtty657");
                      #or maybe apikey=>"jhtty657" without the dash?

$url="https://somewhere.com";


$req = HTTP::Request->new( POST, $url, $header);
$req->content($data);

my $response=$browser->request($req);


Replies are listed 'Best First'.
Re^2: http header
by tobyink (Canon) on May 08, 2017 at 08:59 UTC

    Maybe because it's not a wrapper around LWP. It's an HTTP class that chooses between several backend implementations, one of which is LWP. There's no guarantee that LWP is installed on the OP's machine.

      "This module can be useful in a restrictive environment where you need to be able to download CPAN modules without an HTTPS support in built-in HTTP library."

      Get a better job then. :) No really. :)