Write an HTTP header block. :arg start_line: a `.RequestStartLine` or `.ResponseStartLine`. :arg headers: a `.HTTPHeaders` instance. :arg chunk: the first (optional) chunk of data. This is an optimization so that small responses can be written in the same call a
(
self,
start_line: Union["RequestStartLine", "ResponseStartLine"],
headers: HTTPHeaders,
chunk: Optional[bytes] = None,
)
| 567 | """ |
| 568 | |
| 569 | def write_headers( |
| 570 | self, |
| 571 | start_line: Union["RequestStartLine", "ResponseStartLine"], |
| 572 | headers: HTTPHeaders, |
| 573 | chunk: Optional[bytes] = None, |
| 574 | ) -> "Future[None]": |
| 575 | """Write an HTTP header block. |
| 576 | |
| 577 | :arg start_line: a `.RequestStartLine` or `.ResponseStartLine`. |
| 578 | :arg headers: a `.HTTPHeaders` instance. |
| 579 | :arg chunk: the first (optional) chunk of data. This is an optimization |
| 580 | so that small responses can be written in the same call as their |
| 581 | headers. |
| 582 | |
| 583 | The ``version`` field of ``start_line`` is ignored. |
| 584 | |
| 585 | Returns a future for flow control. |
| 586 | |
| 587 | .. versionchanged:: 6.0 |
| 588 | |
| 589 | The ``callback`` argument was removed. |
| 590 | """ |
| 591 | raise NotImplementedError() |
| 592 | |
| 593 | def write(self, chunk: bytes) -> "Future[None]": |
| 594 | """Writes a chunk of body data. |
no outgoing calls