Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implement HttpRequestRetryHandler and RequestBuilder in httpclient5

I plan to update my project to use httpclient5.
After that I recognized in httpclient5 (5.0, 5.01 and 5.0.2), they don't have the class HttPRequestRetryHandler and RequestBuilder anymore.
Is there any way or update to not use these class in http5, or do we have some alternatives with the same functions?

like image 379
Thanh Huy Le Avatar asked Dec 01 '25 11:12

Thanh Huy Le


1 Answers

  1. Use org.apache.hc.client5.http.HttpRequestRetryStrategy instead.

  2. Use org.apache.hc.core5.http.io.support.ClassicRequestBuilder with the classic transport and org.apache.hc.core5.http.nio.support.AsyncRequestBuilder with the async transport.

Generally this resource might prove useful when migrating from Apache HttpClient 4.5.x to Apache HttpClient 5.x

https://ok2c.github.io/httpclient-migration-guide/

like image 106
ok2c Avatar answered Dec 04 '25 01:12

ok2c



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!