No such thing as a small change | |
PerlMonks |
Re^2: Building a URL Query String from a Data Structureby dorko (Prior) |
on Feb 10, 2016 at 13:07 UTC ( [id://1154851]=note: print w/replies, xml ) | Need Help?? |
Thank you taking the time to help out a poor lost soul.
I got it installed and working just before I left work yesterday. (CPAN got stuck in a seemingly infinite loop working out dependencies, so I just started installing the dependencies until CPAN could get HTTP::Request::JSON installed.) This code:
results in this output:
So it looks like HTTP::Request::JSON creates an HTTP::Request object set up for a POST that contains a JSON payload. That gets me two thirds the way there, but I'm missing the CGI query string. I'm working with a RESTful web API. I need to send a GET and the API only accepts the query string. It ignores any content body that is sent. Actually, that's why I'm doing this. The API used to work fine with JSON sent as an attachment, then somebody got all standards compliant (or something) and now their GET requests only work with query strings passing data. Cheers,
Brent
-- Yeah, I'm a Delt.
In Section
Seekers of Perl Wisdom
|
|