Alex Rivera | Logout

redirect_to using POST in rails

Asked 2009-06-12T08:29:11.960
68

Is it possible to redirect using a POST method ?
Or should redirects always be made using GET ?

The use for this is in the final steps of an order process for an e-commerce site, to send the data to the payment processor, without introducing an extra step for the user.

Edit
Report

1 Answer

85

Redirection isn't possible with POST requests - it's part of the HTTP/1.1 protocol.

You could either introduce another step that contains the form data to be POSTed to the payment processor, or you could send the post from your application (something I have done when working with PROTX).

answered 2009-06-12T08:30:33.457

Your Answer