When your WSGI (Web Server Gateway Interface) handles a request, Flask creates a request context object that contains all the information about the request itself. This object is pushed into a stack that contains other important information, such as the Flask app , g, session, and flash messages.
The request object is available to any function, view, or template that is currently processing the request; this happens without the need to pass around the request object itself. request contains information such as HTTP headers, URI arguments, URL path, WSGI environment, and whatnot.
For more detailed information on the Flask request object, see: http://flask.pocoo.org/docs/api/#incoming-request-data.
We can easily add more information to the request context by implementing our own hooks on request creation. To achieve this, we can use Flask's decorator...