Sergio Casero
03/07/2019, 1:27 PMval response = client.get<RoutesResponseDto> {
val url = "${ENDPOINT}origin=${origin.latitude},${origin.longitude}&destination=${destination.latitude},${destination.longitude}&key=$apiKey"
url(Url(url))
}
I've tried with a couple of options:
1. url(Url("$ENDPOINT$parameters"))
2. private fun HttpRequestBuilder.url(path: String) {
url {
takeFrom(ENDPOINT)
encodedPath = path
}
}
(Where path is the parameters string)
Any ideas? 😞. If I print the result URL, it works perfectly with POSTMAN, chrome, retrofit...
PD: Platform is Android, and I've checked also with http
. I've found this issue -> https://github.com/ktorio/ktor/issues/866 and bump version to 1.1.3, but doesn't work