ServerResponse constructor

ServerResponse({
  1. required int statusCode,
  2. Map<String, String>? headers,
  3. String body = '',
  4. List<int>? bodyBytes,
})

Implementation

ServerResponse({
  required this.statusCode,
  Map<String, String>? headers,
  this.body = '',
  List<int>? bodyBytes,
}) : headers = headers != null ? Map.from(headers) : {},
     bodyBytes = bodyBytes ?? utf8.encode(body);