A bytes-like streamable HTTP response representation.
| 8 | |
| 9 | |
| 10 | class RawResponse(BytesIO): |
| 11 | """ |
| 12 | A bytes-like streamable HTTP response representation. |
| 13 | """ |
| 14 | |
| 15 | def stream(self, **kwargs): |
| 16 | contents = self.read() |
| 17 | while contents: |
| 18 | yield contents |
| 19 | contents = self.read() |
| 20 | |
| 21 | |
| 22 | class StubbedHTTPClient: |