(text: str)
| 158 | |
| 159 | |
| 160 | def encode_text(text: str) -> tuple[dict[str, str], ByteStream]: |
| 161 | body = text.encode("utf-8") |
| 162 | content_length = str(len(body)) |
| 163 | content_type = "text/plain; charset=utf-8" |
| 164 | headers = {"Content-Length": content_length, "Content-Type": content_type} |
| 165 | return headers, ByteStream(body) |
| 166 | |
| 167 | |
| 168 | def encode_html(html: str) -> tuple[dict[str, str], ByteStream]: |
no test coverage detected