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

Method write

aiohttp/web_reqrep.py:735–747  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

733 return resp_impl
734
735 def write(self, data):
736 assert isinstance(data, (bytes, bytearray, memoryview)), \
737 'data argument must be byte-ish (%r)' % type(data)
738
739 if self._eof_sent:
740 raise RuntimeError("Cannot call write() after write_eof()")
741 if self._resp_impl is None:
742 raise RuntimeError("Cannot call write() before start()")
743
744 if data:
745 return self._resp_impl.write(data)
746 else:
747 return ()
748
749 @asyncio.coroutine
750 def drain(self):

Callers 10

test_write_non_byteishFunction · 0.95
test_write_before_startFunction · 0.95
test_write_returns_drainFunction · 0.95
handlerMethod · 0.95
introFunction · 0.95
helloFunction · 0.95
write_eofMethod · 0.45

Calls

no outgoing calls

Tested by 7

test_write_non_byteishFunction · 0.76
test_write_before_startFunction · 0.76
test_write_returns_drainFunction · 0.76
handlerMethod · 0.76