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

Method dispatch_request

examples/plnt/webapp.py:34–43  ·  view source on GitHub ↗
(self, environ, start_response)

Source from the content-addressed store, hash-verified

32 local.application = self
33
34 def dispatch_request(self, environ, start_response):
35 self.bind_to_context()
36 local.request = request = Request(environ, start_response)
37 local.url_adapter = adapter = url_map.bind_to_environ(environ)
38 try:
39 endpoint, values = adapter.match(request.path)
40 response = endpoints[endpoint](request, **values)
41 except HTTPException as e:
42 response = e
43 return ClosingIterator(response(environ, start_response), session.remove)
44
45 def __call__(self, environ, start_response):
46 return self._dispatch(environ, start_response)

Callers

nothing calls this directly

Calls 5

bind_to_contextMethod · 0.95
RequestClass · 0.90
ClosingIteratorClass · 0.90
bind_to_environMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected