I am using the flask micro-framework and need some explanation on the flask.request
. The documentation on the The request context is not clear to me. As I tried:
from flask import request
help(request)
which returns Help on LocalProxy in module werkzeug.local object
and dir(request)
returns an empty list.What methods I can access using a dot on request
?
The Flask request
global is a proxy object for a request context; the proxy accesses the correct context to keep your request data access thread safe.
See the Request Context documentation.
For documentation on what is available, you can read the flask.Request
API documentation, and the Werkzeug documentation on Request / Response objects.
In an interactive session, import flask.wrappers.Request
:
>>> from flask.wrappers import Request
>>> Request
<class 'flask.wrappers.Request'>
>>> help(Request)
Help on class Request in module flask.wrappers:
[ ... etc ...]
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