writeResponse method

  1. @override
Future<void> writeResponse(
  1. HttpResponse resp
)
override

Writes body of the HTTP response from body property

Different ValueTypes are differently when they are written to the response.

Implementation

@override
Future<void> writeResponse(HttpResponse resp) async {
  writeAllButBody(resp);
  if (body != null) {
    await resp.redirect(body!, status: statusCode);
  } else {
    // TODO should this be allowed?
  }
}