HttpClientFactory should return a CloseableHttpClient

Description

In advance to the default HttpClient the CloseableHttpClient returns a CloseableHttpResponse which can get auto closed in a try-catch block like

This should reduce errors in dealing with non-closed responses.

Activity

Show:
Christoph Nagel
January 2, 2020, 4:41 PM

I’ve created a PR in

Needed to increase package version to 2.0.0

Stefan Seifert
January 3, 2020, 3:01 PM

thanks - i've updated the PR to add new methods returning CloseableHttpClient interface instead of changing the existing ones. no need to break backward compatibility here, that complicates updating existing apps and systems.

i've also applied the same change to the http async client.

Fixed

Assignee

Stefan Seifert

Reporter

Christoph Nagel

Labels

None

Components

Affects versions

Priority

Minor
Configure