Read and return the binary response content.
(self)
| 465 | return cast(R, parsed) |
| 466 | |
| 467 | async def read(self) -> bytes: |
| 468 | """Read and return the binary response content.""" |
| 469 | try: |
| 470 | return await self.http_response.aread() |
| 471 | except httpx.StreamConsumed as exc: |
| 472 | # the default error raised by httpx isn't very |
| 473 | # helpful in our case so we re-raise it with |
| 474 | # a different error message |
| 475 | raise StreamAlreadyConsumed() from exc |
| 476 | |
| 477 | async def text(self) -> str: |
| 478 | """Read and decode the response content into a string.""" |
no test coverage detected