Apache HttpClient 5.0 migration guide
Prior to migration from HttpClient 4.x to HttpClient 5.0 it is highly recommended to ensure that HttpClient 4.x is up to date and is being used in accordance with the best practices and recommendations.
When migrating from HttpClient 4.x to HttpClient 5.0 it is generally recommended to migrate to the classic APIs as the first step.
When migrating to HttpClient 5.0 async APIs it might be easier to start off by using simple (using in-memory buffers) asynchronous handlers.
The ultimate goal of the migration process should be to use HttpClient 5.0 async APIs with full content streaming over full-duplex HTTP/1.1 or HTTP/2 connections.
For those scenarios where HTTP/1.1 compatibility is no longer required HttpClient 5.0 provides HTTP/2 optimized clients.