ServerResponse.text constructor
ServerResponse.text(})
Creates a plain-text response.
Implementation
factory ServerResponse.text(
String text, {
int status = 200,
String contentType = 'text/plain; charset=utf-8',
Headers? headers,
}) => ServerResponse.bytes(
utf8.encode(text),
status: status,
contentType: contentType,
headers: headers,
);