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

Method dispatch_request

src/flask/views.py:182–191  ·  view source on GitHub ↗
(self, **kwargs: t.Any)

Source from the content-addressed store, hash-verified

180 cls.methods = methods
181
182 def dispatch_request(self, **kwargs: t.Any) -> ft.ResponseReturnValue:
183 meth = getattr(self, request.method.lower(), None)
184
185 # If the request method is HEAD and we don't have a handler for it
186 # retry with GET.
187 if meth is None and request.method == "HEAD":
188 meth = getattr(self, "get", None)
189
190 assert meth is not None, f"Unimplemented method {request.method!r}"
191 return current_app.ensure_sync(meth)(**kwargs) # type: ignore[no-any-return]

Callers

nothing calls this directly

Calls 1

ensure_syncMethod · 0.80

Tested by

no test coverage detected