isTextResponse method

bool isTextResponse()

Implementation

bool isTextResponse() {
  var contentType = headers['content-type']?.toString() ?? '';
  return [
    'json',
    'text',
    'xml',
  ].where((e) => contentType.contains(e)).isNotEmpty;
}