This is the question:How to get POST variables in Python, when using gevent?
The following is passed to the application:
def application(env, start_response):
And this is the other part:
if __name__ == '__main__':
print 'Serving on 8080...'
WSGIServer(('', 8080), application).serve_forever()
But env doesn't contain my POST!
Please enlighten me - where does my misunderstanding lie?
Thank you!
You need to parse the request body environ['wsgi.input'].read()
.
However, you're better off using a web framework to do that for you. Most of the WSGI-enabled web frameworks work well with gevent. If you need something minimal, bottle is nice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With