asJsoup

fun Response.asJsoup(html: String? = null): Document

Parses the Response as HTML using Jsoup library and returns a Document object.

Return

A Jsoup Document object representing the parsed HTML.

Parameters

html

The HTML content to parse. If null, the response body content will be used.

Throws

If an I/O error occurs while reading the response body.