MCPcopy
hub / github.com/benoitc/gunicorn / read

Method read

gunicorn/http2/request.py:33–44  ·  view source on GitHub ↗

Read data from the body. Args: size: Number of bytes to read, or None for all remaining Returns: bytes: The requested data

(self, size=None)

Source from the content-addressed store, hash-verified

31 self._len = len(data)
32
33 def read(self, size=None):
34 """Read data from the body.
35
36 Args:
37 size: Number of bytes to read, or None for all remaining
38
39 Returns:
40 bytes: The requested data
41 """
42 if size is None:
43 return self._data.read()
44 return self._data.read(size)
45
46 def readline(self, size=None):
47 """Read a line from the body.

Callers 9

test_read_allMethod · 0.95
test_read_with_sizeMethod · 0.95
test_read_none_sizeMethod · 0.95
test_closeMethod · 0.95
test_read_all_at_onceMethod · 0.95
test_read_chunkedMethod · 0.95
receive_dataMethod · 0.45

Calls

no outgoing calls

Tested by 7

test_read_allMethod · 0.76
test_read_with_sizeMethod · 0.76
test_read_none_sizeMethod · 0.76
test_closeMethod · 0.76
test_read_all_at_onceMethod · 0.76
test_read_chunkedMethod · 0.76