The HTTP client the SDK is using is deprecated. BandwidthClient.getClient() returns a brand new, deprecated DefaultHttpClient every time you call it. Don't do that. We should instead be using an HttpClientBuilder to build a client.
Also, it should definitely not be returning a brand new client every time that method is called. There should only ever be one client around. Those things are heavy and consume a lot of resources.
The HTTP client the SDK is using is deprecated.
BandwidthClient.getClient()
returns a brand new, deprecatedDefaultHttpClient
every time you call it. Don't do that. We should instead be using anHttpClientBuilder
to build a client.Also, it should definitely not be returning a brand new client every time that method is called. There should only ever be one client around. Those things are heavy and consume a lot of resources.