WebViewResolver

actual class WebViewResolver : Interceptor(source)

When used as Interceptor additionalUrls cannot be returned, use WebViewResolver(...).resolveUsingWebView(...)

Parameters

interceptUrl

will stop the WebView when reaching this url.

additionalUrls

this will make resolveUsingWebView also return all other requests matching the list of Regex.

userAgent

if null then will use the default user agent

useOkhttp

will try to use the okhttp client as much as possible, but this might cause some requests to fail. Disable for cloudflare.

script

pass custom js to execute

scriptCallback

will be called with the result from custom js

timeout

close webview after timeout

expect class WebViewResolver : <ERROR CLASS> ERROR CLASS: Symbol not found for Interceptor(source)

When used as Interceptor additionalUrls cannot be returned, use WebViewResolver(...).resolveUsingWebView(...)

Parameters

interceptUrl

will stop the WebView when reaching this url.

additionalUrls

this will make resolveUsingWebView also return all other requests matching the list of Regex.

userAgent

if null then will use the default user agent

useOkhttp

will try to use the okhttp client as much as possible, but this might cause some requests to fail. Disable for cloudflare.

script

pass custom js to execute

scriptCallback

will be called with the result from custom js

timeout

close webview after timeout

actual class WebViewResolver : Interceptor(source)

When used as Interceptor additionalUrls cannot be returned, use WebViewResolver(...).resolveUsingWebView(...)

Parameters

interceptUrl

will stop the WebView when reaching this url.

additionalUrls

this will make resolveUsingWebView also return all other requests matching the list of Regex.

userAgent

if null then will use the default user agent

useOkhttp

will try to use the okhttp client as much as possible, but this might cause some requests to fail. Disable for cloudflare.

script

pass custom js to execute

scriptCallback

will be called with the result from custom js

timeout

close webview after timeout

Constructors

Link copied to clipboard
actual constructor(interceptUrl: Regex, additionalUrls: List<Regex>, userAgent: String?, useOkhttp: Boolean, script: String?, scriptCallback: (String) -> Unit?, timeout: Long)
expect constructor(interceptUrl: ERROR CLASS: Symbol not found for Regex, additionalUrls: List<ERROR CLASS: Symbol not found for Regex> = emptyList(), userAgent: String? = USER_AGENT, useOkhttp: Boolean = true, script: String? = null, scriptCallback: (String) -> Unit? = null, timeout: Long = DEFAULT_TIMEOUT)
actual constructor(interceptUrl: Regex, additionalUrls: List<Regex>, userAgent: String?, useOkhttp: Boolean, script: String?, scriptCallback: (String) -> Unit?, timeout: Long)

Types

Link copied to clipboard
actual object Companion
expect object Companion
actual object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun intercept(chain: Interceptor.Chain): Response
open override fun intercept(chain: Interceptor.Chain): Response
Link copied to clipboard
actual suspend fun resolveUsingWebView(request: Request, requestCallBack: (Request) -> Boolean): Pair<Request?, List<Request>>
actual suspend fun resolveUsingWebView(url: String, referer: String?, method: String, requestCallBack: (Request) -> Boolean): Pair<Request?, List<Request>>
actual suspend fun resolveUsingWebView(url: String, referer: String?, headers: Map<String, String>, method: String, requestCallBack: (Request) -> Boolean): Pair<Request?, List<Request>>
expect suspend fun resolveUsingWebView(request: ERROR CLASS: Symbol not found for Request, requestCallBack: (ERROR CLASS: Symbol not found for Request) -> Boolean = { false }): ERROR CLASS: Symbol not found for Pair<ERROR CLASS: Symbol not found for Request?, kotlin/collections/List<ERROR CLASS: Symbol not found for Request>>
expect suspend fun resolveUsingWebView(url: String, referer: String? = null, method: String = "GET", requestCallBack: (ERROR CLASS: Symbol not found for Request) -> Boolean = { false }): ERROR CLASS: Symbol not found for Pair<ERROR CLASS: Symbol not found for Request?, kotlin/collections/List<ERROR CLASS: Symbol not found for Request>>
expect suspend fun resolveUsingWebView(url: String, referer: String? = null, headers: Map<String, String> = emptyMap(), method: String = "GET", requestCallBack: (ERROR CLASS: Symbol not found for Request) -> Boolean = { false }): ERROR CLASS: Symbol not found for Pair<ERROR CLASS: Symbol not found for Request?, kotlin/collections/List<ERROR CLASS: Symbol not found for Request>>
actual suspend fun resolveUsingWebView(request: Request, requestCallBack: (Request) -> Boolean): Pair<Request?, List<Request>>
actual suspend fun resolveUsingWebView(url: String, referer: String?, method: String, requestCallBack: (Request) -> Boolean): Pair<Request?, List<Request>>
actual suspend fun resolveUsingWebView(url: String, referer: String?, headers: Map<String, String>, method: String, requestCallBack: (Request) -> Boolean): Pair<Request?, List<Request>>