MCPcopy
hub / github.com/pallets/flask / full_dispatch_request

Method full_dispatch_request

src/flask/app.py:904–920  ·  view source on GitHub ↗

Dispatches the request and on top of that performs request pre and postprocessing as well as HTTP exception catching and error handling. .. versionadded:: 0.7

(self)

Source from the content-addressed store, hash-verified

902 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
903
904 def full_dispatch_request(self) -> Response:
905 """Dispatches the request and on top of that performs request
906 pre and postprocessing as well as HTTP exception catching and
907 error handling.
908
909 .. versionadded:: 0.7
910 """
911 self._got_first_request = True
912
913 try:
914 request_started.send(self, _async_wrapper=self.ensure_sync)
915 rv = self.preprocess_request()
916 if rv is None:
917 rv = self.dispatch_request()
918 except Exception as e:
919 rv = self.handle_user_exception(e)
920 return self.finalize_request(rv)
921
922 def finalize_request(
923 self,

Callers 3

wsgi_appMethod · 0.95

Calls 4

preprocess_requestMethod · 0.95
dispatch_requestMethod · 0.95
handle_user_exceptionMethod · 0.95
finalize_requestMethod · 0.95