pub fn html<T>(body: T) -> Html<T>
Expand description
Reply with a body and content-type
set to text/html; charset=utf-8
.
§Example
use warp::Filter;
let body = r#"
<html>
<head>
<title>HTML with warp!</title>
</head>
<body>
<h1>warp + HTML = ♥</h1>
</body>
</html>
"#;
let route = warp::any()
.map(move || {
warp::reply::html(body)
});