in reply to Re^4: Shortest/quickest way for Perl to take POST data it receives and send a POST request with this data to another URL?
in thread Shortest/quickest way for Perl to take POST data it receives and send a POST request with this data to another URL?

Stupid people write unclear questions!

How intelligent one is has little to no direct bearing on how well one communicates. It's a skill, not a trait.

While as lacking in implementation specifics as your question, you have at least two answers -- zentara's and mine -- that seem to address what you want and the various proxy answers might as well. You'll either have to be much more specific, as with some sample code and expected behavior, or do some reading and experimenting with the tools you've been handed.

  • Comment on Re^5: Shortest/quickest way for Perl to take POST data it receives and send a POST request with this data to another URL?

Replies are listed 'Best First'.
Re^6: Shortest/quickest way for Perl to take POST data it receives and send a POST request with this data to another URL?
by BrowserUk (Patriarch) on Nov 06, 2013 at 09:03 UTC

    If you had a single url to rewrite; and weren't already using Plack, would you really install this lot rather than write a 10-line LWP::Simple script?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      If I didn't know Plack, no, but I do (and am trying to improve my knowledge in the area) so, yes. PSGI middlewares (Plack::Middleware) for example add a huge amount of drop-in utility that otherwise range from difficult to dirty to hack up in a hand rolled version built for a single purpose. The script could proxy or not by a map of URLs, do custom authentication in front of some, run an arbitrary number of other apps/CGIs (Catalyst/Dancer/PHP/Whatever) alongside a proxy (which would require more than a one liner in this case), display show|hide timing/debug/env in the page with JS. Each addition being one to five or six new lines of code. You also get multiple deployment options, uWSGI, Starman, Twiggy, FCGI, and several more.

      Nothing wrong with bare bones Perl. Kits like Plack give you easy room for growth and adjustment.

        If I didn't know Plack, no, but I do

        Hm. And that makes it appropriate to advocate this to the OP when this is sufficient for his needs?


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.