I use kohttp to send requests to my service, but I got stuck.
Lets imagine that we have a function, that creates a request with some parameters that are represented as Map, and also append to them one or more additional param.
override fun request(urlString: String, params: Map<String, Any>?): Response {
val response = httpGet {
url = urlString
param {
"someName" to someValue
// also add 'params' map to request parameters
}
}
return response;
}
How can we do so?