getHtml

suspend fun getHtml(link: String, userAgent: String = webJs.defaultUserAgent, headers: Map<String, String> = emptyMap(), timeout: Long = 1000): String?

Get the html of the link after being loaded in a Webview

Return

The html of the link

Parameters

link

Link to be loaded in the webview

userAgent

Optional user agent to be used while loading the link

headers

Optional additional headers

timeout

Time to wait after onPageFinished is called before getting the html