MCPcopy
hub / github.com/cherrypy/cherrypy / get_serving

Method get_serving

cherrypy/_cptree.py:150–163  ·  view source on GitHub ↗

Create and return a Request and Response object.

(self, local, remote, scheme, sproto)

Source from the content-addressed store, hash-verified

148 return default
149
150 def get_serving(self, local, remote, scheme, sproto):
151 """Create and return a Request and Response object."""
152 req = self.request_class(local, remote, scheme, sproto)
153 req.app = self
154
155 for name, toolbox in self.toolboxes.items():
156 req.namespaces[name] = toolbox
157
158 resp = self.response_class()
159 cherrypy.serving.load(req, resp)
160 cherrypy.engine.publish('acquire_thread')
161 cherrypy.engine.publish('before_request')
162
163 return req, resp
164
165 def release_serving(self):
166 """Release the current serving (request and response)."""

Callers 3

handlerFunction · 0.80
runMethod · 0.80
respondMethod · 0.80

Calls 3

itemsMethod · 0.80
publishMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected