Skip to content Skip to sidebar Skip to footer

Mod Python, Get POST Parameters From Request Object

Is there any basic example that shows how to get POST parameters from the request in mod python custom handler. I have no trouble in GET requests, where I get my arguments from req

Solution 1:

request.args stores query string parameters, as mentioned in the documentation.

If you want to get POST variables, you can always read the body of the request (request.read()) and parse it (urldecode in your case).

But keep in mind that, as mentioned on the official mod_python homepage:

Current State of Mod_Python

Currently mod_python is not under active development. This does not mean that it is "dead" as some people have claimed. It smiply means that the code and the project are mature enough when very little is required to maintain it.

Which means you may be better off using something more modern, like mod_wsgi.


Post a Comment for "Mod Python, Get POST Parameters From Request Object"