Forum Discussion
How to preserve data in a HTTP 302 redirect of a POST
A 302 response is really nothing more that a simple message with a 302 status code and a Location header. That said, you could very easily send back arbitrary data in the 302 message in the payload or the URI. A browser would generally ignore the payload of a 302 response though, so it may make more sense, if the next server needs this information to either:
-
Convert the POST payload to query string data and include in the Location URL, or
-
Issue a 307 response instead, which will generally cause a browser to re-POST the data to the specified URL. Not all browsers treat a 307 the same way though, so mileage may vary.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com