Albert Albert - 1 year ago 131
Python Question

Google App Engine self.redirect() POST method

In GAE (Python), using the webApp Framework, calling self.redirect('some_url') redirects the user to that URL via the GET method. Is it possible to do a (redirect) via the POST method with some parameters as well?

If possible, how?


Answer Source

This is not possible due to how most clients implement redirection [1]:

However, most existing user agent implementations treat 302 as if it were a 303 response, performing a GET on the Location field-value regardless of the original request method.

So you must use a workaround (like simply calling the method post() from the RequestHandler) or forget the idea.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download