MCPcopy Create free account
hub / github.com/EasyIME/PIME / read_response

Method read_response

python/python3/tornado/http1connection.py:168–181  ·  view source on GitHub ↗

Read a single HTTP response. Typical client-mode usage is to write a request using `write_headers`, `write`, and `finish`, and then call ``read_response``. :arg delegate: a `.HTTPMessageDelegate` Returns a `.Future` that resolves to a bool after the full response h

(self, delegate: httputil.HTTPMessageDelegate)

Source from the content-addressed store, hash-verified

166 self._pending_write = None # type: Optional[Future[None]]
167
168 def read_response(self, delegate: httputil.HTTPMessageDelegate) -> Awaitable[bool]:
169 """Read a single HTTP response.
170
171 Typical client-mode usage is to write a request using `write_headers`,
172 `write`, and `finish`, and then call ``read_response``.
173
174 :arg delegate: a `.HTTPMessageDelegate`
175
176 Returns a `.Future` that resolves to a bool after the full response has
177 been read. The result is true if the stream is still open.
178 """
179 if self.params.decompress:
180 delegate = _GzipMessageDelegate(delegate, self.params.chunk_size)
181 return self._read_message(delegate)
182
183 async def _read_message(self, delegate: httputil.HTTPMessageDelegate) -> bool:
184 need_delegate_close = False

Callers 5

_server_request_loopMethod · 0.95
read_stream_bodyFunction · 0.95
runMethod · 0.45
_write_bodyMethod · 0.45

Calls 2

_read_messageMethod · 0.95

Tested by 2

read_stream_bodyFunction · 0.76