glimr/http/middleware/expects_html

Expects HTML Middleware

Sets the response format to HTML and configures the error handler to render HTML error pages. Place this at the start of your web middleware group so all downstream middleware and handlers know responses should be HTML.

Values

pub fn run(
  ctx: context.Context(app),
  next: fn(context.Context(app)) -> response.Response(wisp.Body),
) -> response.Response(wisp.Body)

Sets the response format to HTML for this request and wraps the handler with HTML error page responses.

Search Document