Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

smarthacker67's scratchpad

by smarthacker67 (Beadle)
on Jun 12, 2017 at 06:38 UTC ( [id://1192562]=scratchpad: print w/replies, xml ) Need Help??

HI Proj, I am trying to create the equivalent lwp request of following curl. But not sure how to pass -d data in lwp. curl -v <MY URL> -H "Authorization: Bearer <TOKEN>" -d '{"x": "y", "H": {"id": "0"}}' -X OPTIONS code I tried : my $request = HTTP::Request->new(OPTIONS => $self->{url}); $res = $ua->request( $request ,Content => encode_json $body); Method 2:- my $request = HTTP::Request->new(OPTIONS => $self->{url},%$body); $res = $ua->request( $request ); Both didnt work.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-20 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found