in reply to Re^2: Redirect with Perl - POST method
in thread Redirect with Perl - POST method

It's not that Perl cannot POST a redirect ... no one can post a REDIRECT ... it's not part of the spec to begin with and more importantly, your looking at your HTTP verbs backwards ... GET, POST, PUT, DELETE are all things a client can ask of a server ... REDIRECTs are what servers ask of clients.

I don't think you've adequately outlined what you're trying to accomplish, so let me assume.

  1. You have a form that acts like a shopping cart
  2. users post to your form
  3. You do something with the form data
  4. You then pass the data onto ???
  5. ??? completes the transaction ???

it's steps 4 and 5 you're hazy on. Do they need to happen that way. Can you use LWP inside your script to post data to the other server and then parse the response? From that point of view, the transaction is transparent to the user (much in the same way CreditCard transactions are transparent - we as endusers, never see the payment gateway nor the merchant bank).

-derby