public final class UrlConnectionHttpClient extends Object implements SdkHttpClient
SdkHttpClient that uses HttpURLConnection to communicate with the service. This is the
leanest synchronous client that optimizes for minimum dependencies and startup latency in exchange for having less
functionality than other implementations.
See software.amazon.awssdk.http.apache.ApacheHttpClient for an alternative implementation.
This can be created via builder()
| Modifier and Type | Class and Description |
|---|---|
static interface |
UrlConnectionHttpClient.Builder
A builder for an instance of
SdkHttpClient that uses JDKs build-in URLConnection HTTP
implementation. |
| Modifier and Type | Method and Description |
|---|---|
static UrlConnectionHttpClient.Builder |
builder() |
String |
clientName() |
void |
close() |
static SdkHttpClient |
create()
Create a
HttpURLConnection client with the default properties |
static SdkHttpClient |
create(UrlConnectionFactory connectionFactory)
Use this method if you want to control the way a
HttpURLConnection is created. |
ExecutableHttpRequest |
prepareRequest(HttpExecuteRequest request) |
public static UrlConnectionHttpClient.Builder builder()
public static SdkHttpClient create()
HttpURLConnection client with the default propertiesUrlConnectionHttpClientpublic static SdkHttpClient create(UrlConnectionFactory connectionFactory)
HttpURLConnection is created.
This will ignore SDK defaults like SdkHttpConfigurationOption.CONNECTION_TIMEOUT
and SdkHttpConfigurationOption.READ_TIMEOUTconnectionFactory - a function that, given a URI will create an HttpURLConnectionUrlConnectionHttpClientpublic ExecutableHttpRequest prepareRequest(HttpExecuteRequest request)
prepareRequest in interface SdkHttpClientpublic void close()
close in interface AutoCloseableclose in interface SdkAutoCloseablepublic String clientName()
clientName in interface SdkHttpClientCopyright © 2019. All rights reserved.