Migrate to ApacheHttpClient 5.x deprecated methods from 4.x

MSAL

Migrates deprecated methods to their equivalent ones in 5.x.

org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5_DeprecatedMethods
mod run . --recipe=org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5_DeprecatedMethods

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change method name org.apache.hc.client5.http.config.RequestConfig.Builder setSocketTimeout(int) to setResponseTimeout
  2. Change method name org.apache.hc.client5.http.impl.classic.HttpClientBuilder setRetryHandler(..) to setRetryStrategy
  3. Change method name org.apache.http.HttpMessage getAllHeaders() to getHeaders
  4. Change method name org.apache.hc.client5.http.classic.methods.HttpUriRequestBase getURI() to getUri
  5. Change method name org.apache.hc.client5.http.classic.methods.HttpUriRequestBase releaseConnection() to reset
  6. Change method name org.apache.hc.client5.http.auth.AuthScheme getSchemeName() to getName