ResponseWithEtag constructor

ResponseWithEtag(
  1. dynamic body, {
  2. Map<String, dynamic>? additionalHeaders,
  3. required Request request,
  4. required String? etag,
  5. int? statusCode,
  6. ContentType? contentType,
})

Implementation

ResponseWithEtag(dynamic body,
    {Map<String, dynamic>? additionalHeaders,
    required Request request,
    required String? etag,
    int? statusCode,
    ContentType? contentType})
    : super._(
          body is Body
              ? body
              : body != null
                  ? Body(body)
                  : null,
          validationData: etag,
          request: request,
          contentType: contentType,
          statusCode: statusCode ?? 200,
          additionalHeaders: (additionalHeaders ?? <String, dynamic>{})
            ..addAll({if (etag != null) HttpHeaders.etagHeader: etag}));