Update to new API with httpclient 4.3.x dependency.