Skip to content

Instantly share code, notes, and snippets.

@lynas
Created July 8, 2024 13:55
Show Gist options
  • Save lynas/f2405f6520aa1996b4b4d8a70c2b506d to your computer and use it in GitHub Desktop.
Save lynas/f2405f6520aa1996b4b4d8a70c2b506d to your computer and use it in GitHub Desktop.
Log request url before making api call
fun getSomething(
param1: String
): ResponseObj? {
return restClient
.get()
.uri(
"/someUrl/{param1}",
param1
)
.httpRequest {
println("---rrr")
println(it.uri)
}
.retrieve()
.onStatus(HttpStatusCode::is4xxClientError) { _, response ->
handleServiceException(response)
}
.toEntity(ResponseObj::class.java)
.body
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment