queryParam

Requires a query parameter with name to match predicate.

The predicate receives the decoded parameter value, or null when the parameter is absent.

Example:

mokksy.get {
path("/search")
queryParam("q") { it?.startsWith("kotlin") == true }
}

Return

The same instance of RequestSpecificationBuilder.

Parameters

name

Query parameter name.

predicate

Predicate applied to the parameter value.


Requires a query parameter with name to equal value.

Example:

mokksy.get {
path("/search")
queryParam("q", "kotlin")
}

Return

The same instance of RequestSpecificationBuilder.

Parameters

name

Query parameter name.

value

Expected value.