writeResp method

  1. @override
Future<void> writeResp()
override

Implementation

@override
Future<void> writeResp() async {
  if (htmlOrDir.startsWith("<")) {
    headers.contentType = ContentType.html;
    await write(htmlOrDir);
    return;
  }
  File file = File(htmlOrDir);
  headers.contentType = ContentType.html;
  await addStream(file.openRead());
}