Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi Random Walk, The API you are using is pretty clear about this: The token parameter was found in the query string, but must be in the POST body. So, the token must go to the body. Which is by using POST($api, $body_content); I would add also the header "Content-type", "application/x-www-form-urlencoded" to become this:
Now the above is for whenever you are making a request involving a token. The 1st param is the api path, the 2nd param is the post-body as a query string (you can use $client->buildQuery([a=>$a,b=>$b...]) for this) and the 3rd param is a hashref of headers. If the login phase worked somehow differently, then keep using that method and ... end up having two different post() - what can I say? Let me know if there is a public url to test this from my side. In reply to Re^3: Rest::Client Headers not getting through
by bliako
|
|