Read and return the binary response content.
(self)
| 334 | return cast(R, parsed) |
| 335 | |
| 336 | def read(self) -> bytes: |
| 337 | """Read and return the binary response content.""" |
| 338 | try: |
| 339 | return self.http_response.read() |
| 340 | except httpx.StreamConsumed as exc: |
| 341 | # The default error raised by httpx isn't very |
| 342 | # helpful in our case so we re-raise it with |
| 343 | # a different error message. |
| 344 | raise StreamAlreadyConsumed() from exc |
| 345 | |
| 346 | def text(self) -> str: |
| 347 | """Read and decode the response content into a string.""" |