Hey Guys, I have question regarding closing HttpCl...
# ktor
a
Hey Guys, I have question regarding closing HttpClient in ktor. I am working on a logging library using Multiplatform which will be accessing HttpClient frequently to send data to remote server. If I close the client after each request and then create a new client for the next request will that be better over just creating a singleton client and using it for all the request?
e
i do the latter
m
You should reuse
HttpClient
instances as they can manage and coordinate quite a lot of resources.
a
👍 thanks for replying!