send method

Future<void> send(
  1. dynamic text, {
  2. ContentType? contentType,
  3. int statusCode = HttpStatus.ok,
})

send text String

Implementation

Future<void> send(
  dynamic text, {
  ContentType? contentType,
  int statusCode = HttpStatus.ok,
}) async {
  final res = response
    ..headers.contentType = contentType ?? ContentType.text
    ..statusCode = statusCode
    ..write(text);
  await res.close();
}