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,
)
| 739 | """ |
| 740 | |
| 741 | def write_headers( |
| 742 | self, |
| 743 | start_line: Union["RequestStartLine", "ResponseStartLine"], |
| 744 | headers: HTTPHeaders, |
| 745 | chunk: Optional[bytes] = None, |
| 746 | ) -> "Future[None]": |
| 747 | """Write an HTTP header block. |
| 748 | |
| 749 | :arg start_line: a `.RequestStartLine` or `.ResponseStartLine`. |
| 750 | :arg headers: a `.HTTPHeaders` instance. |
| 751 | :arg chunk: the first (optional) chunk of data. This is an optimization |
| 752 | so that small responses can be written in the same call as their |
| 753 | headers. |
| 754 | |
| 755 | The ``version`` field of ``start_line`` is ignored. |
| 756 | |
| 757 | Returns a future for flow control. |
| 758 | |
| 759 | .. versionchanged:: 6.0 |
| 760 | |
| 761 | The ``callback`` argument was removed. |
| 762 | """ |
| 763 | raise NotImplementedError() |
| 764 | |
| 765 | def write(self, chunk: bytes) -> "Future[None]": |
| 766 | """Writes a chunk of body data. |
no outgoing calls