start method

  1. @override
void start(
  1. int status, {
  2. bool gzip = false,
})
override

Starts the answer with status, the gRPC content type and grpc-accept-encoding (and grpc-encoding: gzip when gzip), and the headers set so far.

Implementation

@override
void start(int status, {bool gzip = false}) {
  _response.statusCode = status;
  // the server presets text/plain: the lines replace it
  _response.headers.removeAll(HttpHeaders.contentLengthHeader);
  _response.headerLines = gzip ? _gzipHead : _head;
}