Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Post query to Metacpan API

by Haarg (Curate)
on Sep 24, 2018 at 15:01 UTC ( #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
Node Status?
node history
Node Type: note [id://1222914]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2020-10-31 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (290 votes). Check out past polls.

    Notices?