ServerResponse.html constructor

ServerResponse.html(
  1. String html, {
  2. int status = 200,
  3. Headers? headers,
})

Creates an HTML response.

Implementation

factory ServerResponse.html(
  String html, {
  int status = 200,
  Headers? headers,
}) => ServerResponse.text(
  html,
  status: status,
  contentType: 'text/html; charset=utf-8',
  headers: headers,
);