contentType property
Content type
Implementation
CoapMediaType? get contentType {
final opt = getFirstOption<ContentFormatOption>();
if (opt == null) {
return null;
}
return CoapMediaType.fromIntValue(opt.value);
}
Implementation
set contentType(final CoapMediaType? value) {
if (value == null) {
removeOptions<ContentFormatOption>();
} else {
setOption(ContentFormatOption(value.numericValue));
}
}