Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^2: REST::Client + Request Body

by ravigupta1 (Novice)
on Jul 07, 2020 at 11:50 UTC ( #11119000=note: print w/replies, xml ) Need Help??

in reply to Re: REST::Client + Request Body
in thread REST::Client + Request Body

Hi, Thanks for your prompt response.

it was a typo as i cannot copy/paste my code here, so i wrote it manually here.

Headers i know how to set but as I am new to PERL i don't know how to pass authToken as Request Body. Appreciate if you could help me .... how to pass this value as Request Body or may be share some URL from where i could learn this.

regards, Ravi

Replies are listed 'Best First'.
Re^3: REST::Client + Request Body
by hippo (Bishop) on Jul 07, 2020 at 12:12 UTC

    In my SSCCE the request body is held in $data. It is in a format called JSON. If the server expects a JSON payload then you just need to construct one along the same lines and send it.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2022-10-03 20:56 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (15 votes). Check out past polls.