Read and return the binary response content.
(self)
| 322 | return parsed |
| 323 | |
| 324 | def read(self) -> bytes: |
| 325 | """Read and return the binary response content.""" |
| 326 | try: |
| 327 | return self.http_response.read() |
| 328 | except httpx.StreamConsumed as exc: |
| 329 | # The default error raised by httpx isn't very |
| 330 | # helpful in our case so we re-raise it with |
| 331 | # a different error message. |
| 332 | raise StreamAlreadyConsumed() from exc |
| 333 | |
| 334 | def text(self) -> str: |
| 335 | """Read and decode the response content into a string.""" |