Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: REST::Client + Request Body

by derby (Abbot)
on Oct 13, 2020 at 11:35 UTC ( #11122765=note: print w/replies, xml ) Need Help??

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

hippo++ but I think you sold yourself short by not pointing out the most important part of your SSCCE:

print $rest->responseContent;
Without knowing the what the REST API actually returned, it would be difficult for any monk here to help out. I would also suggest:
print $rest->responseCode();
and check the response code against the documentation. It would not be odd for an API to return a non-successful code with no body or a blank body -- which would be unparseable.

My own approach to APIs is to always try doing it with curl first. Sure setting headers and json bodies with curl can be a bit daunting but using curl via the command line is a great way to explore and/or debug a REST api.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2022-12-01 01:23 GMT
Find Nodes?
    Voting Booth?