MCPcopy
hub / github.com/aio-libs/aiohttp / read

Method read

aiohttp/web_reqrep.py:304–317  ·  view source on GitHub ↗

Read request body if present. Returns bytes object with full request content.

(self)

Source from the content-addressed store, hash-verified

302
303 @asyncio.coroutine
304 def read(self):
305 """Read request body if present.
306
307 Returns bytes object with full request content.
308 """
309 if self._read_bytes is None:
310 body = bytearray()
311 while True:
312 chunk = yield from self._payload.readany()
313 body.extend(chunk)
314 if chunk is EOF_MARKER:
315 break
316 self._read_bytes = bytes(body)
317 return self._read_bytes
318
319 @asyncio.coroutine
320 def text(self):

Callers 2

textMethod · 0.95
postMethod · 0.95

Calls 2

extendMethod · 0.80
readanyMethod · 0.45

Tested by

no test coverage detected