query Param
fun queryParam(name: String, predicate: (String?) -> Boolean): RequestSpecificationBuilder<P>(source)
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 }
}Content copied to clipboard
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")
}Content copied to clipboard
Return
The same instance of RequestSpecificationBuilder.
Parameters
name
Query parameter name.
value
Expected value.