getContentType static method
Gets an object describing a particular variant of content.
Implementation
static Future<ContentTypeDescriptionResponse> getContentType (
HttpClient client,
String type,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _type = '$type';
final HttpClientConfig config = HttpClientConfig('GET', '/Content/GetContentType/$_type/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return ContentTypeDescriptionResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}