toContentType method
Implementation
ContentType toContentType() {
switch (this) {
case 'application/json':
return ContentType.applicationJson;
case 'application/xml':
return ContentType.applicationXml;
}
throw Exception('$this is not known in enum ContentType');
}