Contents
Can POST requests redirect?
Your server accepts the POST data and while the user waits for a response, you establish a connection to another server, POSTing the data, receiving a response, then return an answer to the user. You answer with a 307 redirect, which means the user should attempt the same request at another address.
Is redirect always get?
redirect uses only GET.. It can’t be a post.. And in between what is the language? A redirect is an Http response sent to the client.
Why does rest assured doesn’t redirect POST requests?
But non of this will work for one specific reason – HTTP Specification, which states : If the 302 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.
When to use response.redirect with post instead of get?
Doing this requires understanding how HTTP redirects work. When you use Response.Redirect(), you send a response (to the browser that made the request) with HTTP Status Code 302, which tells the browser where to go next. By definition, the browser will make that via a GET request, even if the original request was a POST.
Can a redirect request be made via a GET request?
By definition, the browser will make that via a GET request, even if the original request was a POST. Another option is to use HTTP Status Code 307, which specifies that the browser should make the redirect request in the same way as the original request, but to prompt the user with a security warning.
Can You redirect a POST request to a different domain?
Different browsers implement this differently, since it is not a common status code. Alas, unlike the Opera and FireFox developers, the IE developers have never read the spec, and even the latest, most secure IE7 will redirect the POST request from domain A to domain B without any warnings or confirmation dialogs!