http://qs321.pair.com?node_id=11119000


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.