From 210abdb4e3e9972534c95ea88dd8d15718625b98 Mon Sep 17 00:00:00 2001 From: Dongie Agnir Date: Tue, 1 Sep 2026 13:12:03 -0700 Subject: [PATCH] Deprecate Apache 4.x HTTP Client ApacheHttpClient, which is based on Apache HttpClient 4.x is being deprecated in favor of the Apache 5.x HTTP client. The Apache 5.x client has already replaced the 4.x client as the default sync HTTP client since 2.46.0. Apache 5.x is actively maintained and receives new feature updates whereas Apache 4.x is in maintenance mode, only receiving critical fixes. --- .../amazon/awssdk/http/apache/ApacheHttpClient.java | 8 ++++++++ .../amazon/awssdk/http/apache/ApacheSdkHttpService.java | 5 +++++ .../amazon/awssdk/http/apache/ProxyConfiguration.java | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ApacheHttpClient.java b/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ApacheHttpClient.java index 6013c07bdaa8..04c1076176c8 100644 --- a/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ApacheHttpClient.java +++ b/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ApacheHttpClient.java @@ -101,8 +101,13 @@ *

See software.amazon.awssdk.http.urlconnection.UrlConnectionHttpClient for an alternative implementation.

* *

This can be created via {@link #builder()}

+ * + * @deprecated Apache 4.x is in maintenance mode. Users are encouraged to switch to the + * Apache 5 HTTP Client + * which is feature compatible with this client. */ @SdkPublicApi +@Deprecated public final class ApacheHttpClient implements SdkHttpClient { public static final String CLIENT_NAME = "Apache"; @@ -345,6 +350,9 @@ public String clientName() { * .socketTimeout(Duration.ofSeconds(10)) * .build(); * + * @deprecated Apache 4.x is in maintenance mode. Users are encouraged to switch to the + * Apache 5 HTTP Client + * which is feature compatible with this client. */ public interface Builder extends SdkHttpClient.Builder { diff --git a/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ApacheSdkHttpService.java b/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ApacheSdkHttpService.java index 8ada6d4fc835..f9605120f244 100644 --- a/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ApacheSdkHttpService.java +++ b/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ApacheSdkHttpService.java @@ -21,8 +21,13 @@ /** * Service binding for the Apache implementation. + * + * @deprecated Apache 4.x is in maintenance mode. Users are encouraged to switch to the + * Apache 5 HTTP Client + * which is feature compatible with this client. */ @SdkPublicApi +@Deprecated public class ApacheSdkHttpService implements SdkHttpService { @Override public SdkHttpClient.Builder createHttpClientBuilder() { diff --git a/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ProxyConfiguration.java b/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ProxyConfiguration.java index a73dfb74e5df..ab83d254d3fe 100644 --- a/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ProxyConfiguration.java +++ b/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ProxyConfiguration.java @@ -32,8 +32,13 @@ /** * Configuration that defines how to communicate via an HTTP or HTTPS proxy. + * + * @deprecated Apache 4.x is in maintenance mode. Users are encouraged to switch to the + * Apache 5 HTTP Client + * which is feature compatible with this client. */ @SdkPublicApi +@Deprecated public final class ProxyConfiguration implements ToCopyableBuilder { private final URI endpoint; private final String username;