write method

  1. @internal
Future<void> write(
  1. HttpRequest httpRequest
)

Implementation

@internal
Future<void> write(HttpRequest httpRequest) async {
  // ignore: invalid_use_of_protected_member
  var httpResponse = httpRequest.response;
  if (writer == null) {
    httpResponse.statusCode = status;
    httpResponse.close();
    return;
  }

  prepareWriter(httpResponse);
  httpResponse.statusCode = status;
  await writer!.writeResp();
  httpResponse.close();
  if (_bgTask != null) _bgTask!();
}