Read and return the binary response content.
(self)
| 441 | return cast(R, parsed) |
| 442 | |
| 443 | async def read(self) -> bytes: |
| 444 | """Read and return the binary response content.""" |
| 445 | try: |
| 446 | return await self.http_response.aread() |
| 447 | except httpx.StreamConsumed as exc: |
| 448 | # the default error raised by httpx isn't very |
| 449 | # helpful in our case so we re-raise it with |
| 450 | # a different error message |
| 451 | raise StreamAlreadyConsumed() from exc |
| 452 | |
| 453 | async def text(self) -> str: |
| 454 | """Read and decode the response content into a string.""" |
no test coverage detected