SentryResponse constructor

SentryResponse({
  1. int? bodySize,
  2. int? statusCode,
  3. Map<String, String>? headers,
  4. String? cookies,
  5. Object? data,
})

Implementation

SentryResponse({
  this.bodySize,
  this.statusCode,
  Map<String, String>? headers,
  String? cookies,
  Object? data,
})  : _data = data,
      _headers = headers != null ? Map.from(headers) : null,
      // Look for a 'Set-Cookie' header (case insensitive) if not given.
      cookies = cookies ??
          IterableUtils.firstWhereOrNull(
            headers?.entries,
            (MapEntry<String, String> e) =>
                e.key.toLowerCase() == 'set-cookie',
          )?.value;