contentType property

  1. @override
ContentType? contentType
override

The ContentType of the contentTypeHeader header, if any.

Implementation

@override
ContentType? get contentType {
  if (_data.containsKey(HttpHeaders.contentTypeHeader)) {
    return ContentType.parse(_data[HttpHeaders.contentTypeHeader]!.join(','));
  } else {
    return null;
  }
}
  1. @override
void contentType=(ContentType? value)
override

The ContentType of the contentTypeHeader header, if any.

Implementation

@override
set contentType(ContentType? value) {
  set(HttpHeaders.contentTypeHeader, value!.value);
}