Read and return the response content.
(self)
| 972 | self.stream.close() |
| 973 | |
| 974 | async def aread(self) -> bytes: |
| 975 | """ |
| 976 | Read and return the response content. |
| 977 | """ |
| 978 | if not hasattr(self, "_content"): |
| 979 | self._content = b"".join([part async for part in self.aiter_bytes()]) |
| 980 | return self._content |
| 981 | |
| 982 | async def aiter_bytes( |
| 983 | self, chunk_size: int | None = None |