MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / LocalResponse

Class LocalResponse

21-async/mojifinder/bottle.py:1687–1698  ·  view source on GitHub ↗

A thread-local subclass of :class:`BaseResponse` with a different set of attributes for each thread. There is usually only one global instance of this class (:data:`response`). Its attributes are used to build the HTTP response at the end of the request/response cycle.

Source from the content-addressed store, hash-verified

1685
1686
1687class LocalResponse(BaseResponse):
1688 ''' A thread-local subclass of :class:`BaseResponse` with a different
1689 set of attributes for each thread. There is usually only one global
1690 instance of this class (:data:`response`). Its attributes are used
1691 to build the HTTP response at the end of the request/response cycle.
1692 '''
1693 bind = BaseResponse.__init__
1694 _status_line = local_property()
1695 _status_code = local_property()
1696 _cookies = local_property()
1697 _headers = local_property()
1698 body = local_property()
1699
1700
1701Request = BaseRequest

Callers 1

bottle.pyFile · 0.85

Calls 1

local_propertyFunction · 0.85

Tested by

no test coverage detected