Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: http headerby nikosv (Deacon) |
on May 08, 2017 at 06:54 UTC ( [id://1189783]=note: print w/replies, xml ) | Need Help?? |
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);
In Section
Seekers of Perl Wisdom
|
|