Keep It Simple, Stupid | |
PerlMonks |
Shortest/quickest way for Perl to take POST data it receives and send a POST request with this data to another URL?by tunafish (Beadle) |
on Nov 05, 2013 at 06:29 UTC ( [id://1061251]=perlquestion: print w/replies, xml ) | Need Help?? |
tunafish has asked for the wisdom of the Perl Monks concerning the following question: I need a script to receive a POST request and then to send that same POST request to a different script. I don't mean that this is a redirect: the user interacts only with script 1; script 2 does not return any data. What's the quickest and dirtiest way of doing this? A possible solution is, of course, to parse the data using CGI, then to form and send a POST request using LWP, but this seem un-Perl-like and inelegant. Surely there's a simpler solution? Edited to add: this needs to be accomplished via a POST request to script 2. Not, say, via exec. Edited to add 2: I think I need to re-phrase the question. How about this: Is there a way to take the request that was used to access a cgi script and turn it into an HTTP::Request object?
Back to
Seekers of Perl Wisdom
|
|