You are right, we don't want to create a new instance for each call. Here is my code which is using dispatch.Http:
trait DispatchHttpClientComponent {
def dispatchClient: Http
}
trait DefaultDispatchHttpClientComponentImpl extends DispatchHttpClientComponent {
lazy val dispatchClient = Http.configure(_.setSSLContext({
val ctx = javax.net.ssl.SSLContext.getInstance("TLSv1.1")
ctx
}))
}
----
So, every time when we make a http call using dispatchClient object, it will not create a new instance, right? I may misunderstand the pull request I mentioned above, I thought it always create a new instance since it is using 'configure' builder.