| 58 | chunks = [] |
| 59 | |
| 60 | class Delegate(HTTPMessageDelegate): |
| 61 | def headers_received(self, start_line, headers): |
| 62 | self.headers = headers |
| 63 | self.start_line = start_line |
| 64 | |
| 65 | def data_received(self, chunk): |
| 66 | chunks.append(chunk) |
| 67 | |
| 68 | def finish(self): |
| 69 | conn.detach() # type: ignore |
| 70 | |
| 71 | conn = HTTP1Connection(stream, True) |
| 72 | delegate = Delegate() |
no outgoing calls