write method

void write(
  1. HttpResponse response
)

Implementation

void write(HttpResponse response) {
  response.statusCode = this.statusCode;
  response.headers.add(HttpHeaders.contentTypeHeader, ContentType.json.value);

  this.headers.forEach((key, value) {
    response.headers.add(key, value);
  });

  response.write(this.content);
  response.close();
}