Generic requests
var variableMethod: Method = Method.GET
val response: Response = http(method = variableMethod) {
host = "google.com"
path = "/search"
param {
"q" to "iphone"
"safe" to "off"
}
}var variableMethod: Method = Method.GET
val context : HttpContext.() -> Unit = {
host = "google.com"
path = "/search"
param {
"q" to "iphone"
"safe" to "off"
}
}
val response: Response = http(method = variableMethod, init = context)Last updated
Was this helpful?