contentType property

  1. @override
ContentType? contentType
override

The ContentType of the contentTypeHeader header, if any.

Implementation

@override
io.ContentType? get contentType {
  final contentType = value(io.HttpHeaders.contentTypeHeader);
  return contentType != null ? io.ContentType.parse(contentType) : null;
}
void contentType=(ContentType? value)
override

The ContentType of the contentTypeHeader header, if any.

Implementation

set contentType(io.ContentType? value) {
  if (value != null) {
    set(io.HttpHeaders.contentTypeHeader, value);
  } else {
    _headers.remove(io.HttpHeaders.contentTypeHeader);
  }
}