Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Post query to Metacpan API

by Haarg (Priest)
on Sep 24, 2018 at 15:01 UTC ( [id://1222914]=note: print w/replies, xml ) Need Help??


in reply to Post query to Metacpan API

The direct problem with your original code is that you are trying to post the data incorrectly. The query should be posted directly as the body content of a POST, not as a query parameter. This can be done with the post method using the content option.

my $http = HTTP::Tiny->new; my $res = $http->post($url, { content => $query });

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1222914]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (None)
    As of 2024-04-25 00:57 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found