Skip to main content

respond_html

Function respond_html 

Source
pub fn respond_html(content: impl Into<String>) -> Response
Expand description

HTML 响应(兜底场景:模板渲染、PDF/Excel 导出)

Content-Type 为 text/html; charset=utf-8,HTTP 状态码 200。

§参数

  • content:HTML 内容

§返回

Response,HTTP 200,Content-Type: text/html; charset=utf-8