Skip to content

Commit e5dfd85

Browse files
authored
Deprecate Apache 4.x HTTP Client (#7340)
* 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. * Add changelog entry
1 parent 3d2b09c commit e5dfd85

4 files changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "deprecation",
3+
"category": "Apache HTTP Client",
4+
"contributor": "",
5+
"description": "`apache-client` is now deprecated in favor of `apache5-client`. [Apache HttpClient 4.x](https://hc.apache.org/status.html) is in maintenance mode, receiving fixes only for major defects and security issues."
6+
}

http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ApacheHttpClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,13 @@
101101
* <p>See software.amazon.awssdk.http.urlconnection.UrlConnectionHttpClient for an alternative implementation.</p>
102102
*
103103
* <p>This can be created via {@link #builder()}</p>
104+
*
105+
* @deprecated Apache 4.x is in maintenance mode. Users are encouraged to switch to the
106+
* <a href="https://docs.aws.amazon.com/java/api/latest/software/amazon/awssdk/http/apache5/Apache5HttpClient.html">Apache 5 HTTP Client</a>
107+
* which is feature compatible with this client.
104108
*/
105109
@SdkPublicApi
110+
@Deprecated
106111
public final class ApacheHttpClient implements SdkHttpClient {
107112

108113
public static final String CLIENT_NAME = "Apache";
@@ -345,6 +350,9 @@ public String clientName() {
345350
* .socketTimeout(Duration.ofSeconds(10))
346351
* .build();
347352
* </pre>
353+
* @deprecated Apache 4.x is in maintenance mode. Users are encouraged to switch to the
354+
* <a href="https://docs.aws.amazon.com/java/api/latest/software/amazon/awssdk/http/apache5/Apache5HttpClient.html">Apache 5 HTTP Client</a>
355+
* which is feature compatible with this client.
348356
*/
349357
public interface Builder extends SdkHttpClient.Builder<ApacheHttpClient.Builder> {
350358

http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ApacheSdkHttpService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@
2121

2222
/**
2323
* Service binding for the Apache implementation.
24+
*
25+
* @deprecated Apache 4.x is in maintenance mode. Users are encouraged to switch to the
26+
* <a href="https://docs.aws.amazon.com/java/api/latest/software/amazon/awssdk/http/apache5/Apache5HttpClient.html">Apache 5 HTTP Client</a>
27+
* which is feature compatible with this client.
2428
*/
2529
@SdkPublicApi
30+
@Deprecated
2631
public class ApacheSdkHttpService implements SdkHttpService {
2732
@Override
2833
public SdkHttpClient.Builder createHttpClientBuilder() {

http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/ProxyConfiguration.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@
3232

3333
/**
3434
* Configuration that defines how to communicate via an HTTP or HTTPS proxy.
35+
*
36+
* @deprecated Apache 4.x is in maintenance mode. Users are encouraged to switch to the
37+
* <a href="https://docs.aws.amazon.com/java/api/latest/software/amazon/awssdk/http/apache5/Apache5HttpClient.html">Apache 5 HTTP Client</a>
38+
* which is feature compatible with this client.
3539
*/
3640
@SdkPublicApi
41+
@Deprecated
3742
public final class ProxyConfiguration implements ToCopyableBuilder<ProxyConfiguration.Builder, ProxyConfiguration> {
3843
private final URI endpoint;
3944
private final String username;

0 commit comments

Comments
 (0)