isHtml property

bool get isHtml

Whether the response Content-Type header indicates HTML.

Implementation

bool get isHtml =>
    headers['content-type']?.first.contains('text/html') ?? false;