Route

class Route

A request paused by a matching route rule. Exactly one of the two calls must be made, or the page waits until its navigation ceiling.

Properties

Link copied to clipboard

Request headers as the page sent them.

Link copied to clipboard

HTTP method of the paused request.

Link copied to clipboard

The same request, as the dev.webdroid.Page.onRequest observation shape.

Link copied to clipboard
val url: String

The URL the page is requesting.

Functions

Link copied to clipboard
fun abort()

Blocks the request entirely; the page sees it fail.

Link copied to clipboard
fun continue()

Lets the request proceed unmodified.

Link copied to clipboard
fun fulfill(mimeType: String = "text/plain", encoding: String = "UTF-8", statusCode: Int = 200, reasonPhrase: String = "OK", headers: Map<String, String> = emptyMap(), body: ByteArray = ByteArray(0))

Answers the request with a synthetic response instead of letting it reach the network.

Link copied to clipboard
fun resume()

Identical to `continue`; kept only for source compatibility.