sendHtml method
Sends an HTML response.
Implementation
void sendHtml(String html) {
if (_sent) return;
_headers.setContentType(ContentType('text', 'html', charset: 'utf-8'));
if (_compression) {
_response.add(gzip.encode(_safeUtf8Encode(html)));
} else {
_response.add(_safeUtf8Encode(html));
}
_closeResponse();
}