MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / read

Method read

src/opencode_ai/_response.py:324–332  ·  view source on GitHub ↗

Read and return the binary response content.

(self)

Source from the content-addressed store, hash-verified

322 return parsed
323
324 def read(self) -> bytes:
325 """Read and return the binary response content."""
326 try:
327 return self.http_response.read()
328 except httpx.StreamConsumed as exc:
329 # The default error raised by httpx isn't very
330 # helpful in our case so we re-raise it with
331 # a different error message.
332 raise StreamAlreadyConsumed() from exc
333
334 def text(self) -> str:
335 """Read and decode the response content into a string."""

Callers 13

parseMethod · 0.95
textMethod · 0.95
jsonMethod · 0.95
requestMethod · 0.45
format_fileFunction · 0.45
test_method_readMethod · 0.45
test_method_readMethod · 0.45

Calls 1