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

Method read

src/opencode_ai/_response.py:424–432  ·  view source on GitHub ↗

Read and return the binary response content.

(self)

Source from the content-addressed store, hash-verified

422 return parsed
423
424 async def read(self) -> bytes:
425 """Read and return the binary response content."""
426 try:
427 return await self.http_response.aread()
428 except httpx.StreamConsumed as exc:
429 # the default error raised by httpx isn't very
430 # helpful in our case so we re-raise it with
431 # a different error message
432 raise StreamAlreadyConsumed() from exc
433
434 async def text(self) -> str:
435 """Read and decode the response content into a string."""

Callers 3

parseMethod · 0.95
textMethod · 0.95
jsonMethod · 0.95

Calls 1

Tested by

no test coverage detected