WebEndpointResponse<T> constructor

const WebEndpointResponse<T>({
  1. T? body,
  2. int? status,
  3. String? contentType,
})

An answer of body with status (200 by default; 404 without a body).

Implementation

const WebEndpointResponse({this.body, int? status, this.contentType})
  : status = status ?? (body == null ? notFound : ok);