Create a :class:`~flask.ctx.RequestContext` representing a WSGI environment. Use a ``with`` block to push the context, which will make :data:`request` point at this request. See :doc:`/reqcontext`. Typically you should not call this from your own code. A request
(self, environ: WSGIEnvironment)
| 1405 | return AppContext(self) |
| 1406 | |
| 1407 | def request_context(self, environ: WSGIEnvironment) -> RequestContext: |
| 1408 | """Create a :class:`~flask.ctx.RequestContext` representing a |
| 1409 | WSGI environment. Use a ``with`` block to push the context, |
| 1410 | which will make :data:`request` point at this request. |
| 1411 | |
| 1412 | See :doc:`/reqcontext`. |
| 1413 | |
| 1414 | Typically you should not call this from your own code. A request |
| 1415 | context is automatically pushed by the :meth:`wsgi_app` when |
| 1416 | handling a request. Use :meth:`test_request_context` to create |
| 1417 | an environment and context instead of this method. |
| 1418 | |
| 1419 | :param environ: a WSGI environment |
| 1420 | """ |
| 1421 | return RequestContext(self, environ) |
| 1422 | |
| 1423 | def test_request_context(self, *args: t.Any, **kwargs: t.Any) -> RequestContext: |
| 1424 | """Create a :class:`~flask.ctx.RequestContext` for a WSGI |