Created
July 8, 2024 13:55
-
-
Save lynas/f2405f6520aa1996b4b4d8a70c2b506d to your computer and use it in GitHub Desktop.
Log request url before making api call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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