APIResponse<T>.notFound constructor

APIResponse<T>.notFound({
  1. Map<String, dynamic>? headers,
  2. T? payload,
  3. Object? payloadDynamic,
  4. Object? mimeType,
  5. Duration? keepAliveTimeout,
  6. int? keepAliveMaxRequests,
  7. Map<String, APIMetric>? metrics,
})

Creates a response of status NOT_FOUND.

Implementation

factory APIResponse.notFound(
    {Map<String, dynamic>? headers,
    T? payload,
    Object? payloadDynamic,
    Object? mimeType,
    Duration? keepAliveTimeout,
    int? keepAliveMaxRequests,
    Map<String, APIMetric>? metrics}) {
  return APIResponse(APIResponseStatus.NOT_FOUND,
      headers: headers ?? <String, dynamic>{},
      payload: payload,
      payloadDynamic: payloadDynamic,
      payloadMimeType: mimeType,
      keepAliveTimeout: keepAliveTimeout,
      keepAliveMaxRequests: keepAliveMaxRequests,
      metrics: metrics);
}