Read and return the binary response content.
(self)
| 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.""" |
no test coverage detected