Hi. Do you know about good library for http client...
# getting-started
s
Hi. Do you know about good library for http client? I want to call external api via http client. My project is Spring boot (server side, not Android) I'm using https://github.com/square/okhttp now. Because there are some merits about performance. (e.g: Connection pooling, Transparent GZIP) There is another good library?
n
Both https://ktor.io and https://www.http4k.org can be used as HTTP clients.
Both can use OkHttp under the hood to do the actual HTTP requests. But you get a nice idiomatic Kotlin interface on top of it.
s
Thank you so much. http4k looks good for Kotlin (http client is also supported) 🙂
t
If you’re already using Spring Boot, is there a good reason to not use the Spring WebClient?
☝️ 1
s
No, I don't have reason.
t
I would stick with that one seeing as you essentially get it “for free”
s
Thank you. I'm not sure if the "WebClient" have the merits that I mentioned first...
some merits about performance. (e.g: Connection pooling, Transparent GZIP)
t
google is your friend there
s
Yeah, I should investigate.