method Reply.html
A text/html; charset=utf-8 reply.
Example:
use std.http { Reply }
fn main() io {
let r = Reply.html("<h1>Hello</h1>")
print("{r.status} {r.headers[0].value}")
}Output
200 text/html; charset=utf-8
pub(api) static fn html(body: str, status: i64 = 200) -> ReplySince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
body | str |
status | i64 = 200 |
Returns
Effects
none declared (pure unless the body says otherwise)
Defined in: std/http/http.oxl:2694