public final class ApacheHttpClient extends Object implements SdkHttpClient
SdkHttpClient that uses Apache HTTP client to communicate with the service. This is the most
powerful synchronous client that adds an extra dependency and additional startup latency in exchange for more functionality,
like support for HTTP proxies.
See com.ibm.cos.v2.http.urlconnection.UrlConnectionHttpClient for an alternative implementation.
This can be created via builder()
| Modifier and Type | Class and Description |
|---|---|
static interface |
ApacheHttpClient.Builder
Builder for creating an instance of
SdkHttpClient. |
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENT_NAME |
| Modifier and Type | Method and Description |
|---|---|
static ApacheHttpClient.Builder |
builder() |
String |
clientName()
Each HTTP client implementation should return a well-formed client name
that allows requests to be identifiable back to the client that made the request.
|
void |
close() |
static SdkHttpClient |
create()
Create a
ApacheHttpClient with the default properties |
ExecutableHttpRequest |
prepareRequest(HttpExecuteRequest request)
Create a
ExecutableHttpRequest that can be used to execute the HTTP request. |
public static final String CLIENT_NAME
public static ApacheHttpClient.Builder builder()
public static SdkHttpClient create()
ApacheHttpClient with the default propertiesApacheHttpClientpublic ExecutableHttpRequest prepareRequest(HttpExecuteRequest request)
SdkHttpClientExecutableHttpRequest that can be used to execute the HTTP request.prepareRequest in interface SdkHttpClientrequest - Representation of an HTTP request.public void close()
SdkAutoCloseableclose in interface SdkAutoCloseableclose in interface AutoCloseablepublic String clientName()
SdkHttpClientclientName in interface SdkHttpClientCopyright © 2026. All rights reserved.