MCPcopy Create free account
hub / github.com/apify/crawlee-python / read

Method read

src/crawlee/http_clients/_base.py:38–46  ·  view source on GitHub ↗

Read the entire content of the response body. This method loads the complete response body into memory at once. It should be used for responses received from regular HTTP requests (via `send_request` or `crawl` methods). Raises: RuntimeError: If called on a resp

(self)

Source from the content-addressed store, hash-verified

36 """The HTTP headers received in the response."""
37
38 async def read(self) -> bytes:
39 """Read the entire content of the response body.
40
41 This method loads the complete response body into memory at once. It should be used
42 for responses received from regular HTTP requests (via `send_request` or `crawl` methods).
43
44 Raises:
45 RuntimeError: If called on a response received from the `stream` method.
46 """
47
48 def read_stream(self) -> AsyncIterator[bytes]:
49 """Iterate over the content of the response body in chunks.

Callers 15

read_lua_scriptFunction · 0.45
loadMethod · 0.45
pre_hookFunction · 0.45
post_hookFunction · 0.45
request_handlerFunction · 0.45
handlerFunction · 0.45
request_handlerFunction · 0.45
handlerFunction · 0.45

Calls

no outgoing calls

Tested by 8

pre_hookFunction · 0.36
post_hookFunction · 0.36
request_handlerFunction · 0.36
handlerFunction · 0.36
request_handlerFunction · 0.36
handlerFunction · 0.36