(self)
| 285 | # Content stream interface. |
| 286 | |
| 287 | def get_headers(self) -> dict[str, str]: |
| 288 | content_length = self.get_content_length() |
| 289 | content_type = self.content_type |
| 290 | if content_length is None: |
| 291 | return {"Transfer-Encoding": "chunked", "Content-Type": content_type} |
| 292 | return {"Content-Length": str(content_length), "Content-Type": content_type} |
| 293 | |
| 294 | def __iter__(self) -> typing.Iterator[bytes]: |
| 295 | for chunk in self.iter_chunks(): |
no test coverage detected