public class OkHttpAetherClient extends java.lang.Object implements AetherClient
Modifier and Type | Class and Description |
---|---|
(package private) class |
OkHttpAetherClient.ResponseAdapter |
Modifier and Type | Field and Description |
---|---|
private AetherClientConfig |
config |
private java.util.Map<java.lang.String,java.lang.String> |
headers |
private okhttp3.OkHttpClient |
httpClient |
private okhttp3.Authenticator |
PROXY_AUTH |
Constructor and Description |
---|
OkHttpAetherClient(AetherClientConfig config) |
Modifier and Type | Method and Description |
---|---|
private okhttp3.Request.Builder |
builder(java.lang.String uri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders) |
void |
close() |
private Response |
execute(okhttp3.OkHttpClient httpClient,
okhttp3.Request request) |
Response |
get(java.lang.String uri) |
Response |
get(java.lang.String uri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders) |
private java.net.Proxy |
getProxy(AetherClientProxy proxy) |
private javax.net.ssl.X509TrustManager |
getX509TrustManager() |
Response |
head(java.lang.String uri) |
Response |
put(java.lang.String uri,
RetryableSource source) |
private java.lang.String |
toHeaderValue(AetherClientAuthentication auth) |
private final okhttp3.Authenticator PROXY_AUTH
private final java.util.Map<java.lang.String,java.lang.String> headers
private final AetherClientConfig config
private final okhttp3.OkHttpClient httpClient
public OkHttpAetherClient(AetherClientConfig config)
public Response head(java.lang.String uri) throws java.io.IOException
head
in interface AetherClient
java.io.IOException
private javax.net.ssl.X509TrustManager getX509TrustManager()
public Response get(java.lang.String uri) throws java.io.IOException
get
in interface AetherClient
java.io.IOException
public Response get(java.lang.String uri, java.util.Map<java.lang.String,java.lang.String> requestHeaders) throws java.io.IOException
get
in interface AetherClient
java.io.IOException
public Response put(java.lang.String uri, RetryableSource source) throws java.io.IOException
put
in interface AetherClient
java.io.IOException
private Response execute(okhttp3.OkHttpClient httpClient, okhttp3.Request request) throws java.io.IOException
java.io.IOException
private java.lang.String toHeaderValue(AetherClientAuthentication auth)
private java.net.Proxy getProxy(AetherClientProxy proxy)
private okhttp3.Request.Builder builder(java.lang.String uri, java.util.Map<java.lang.String,java.lang.String> requestHeaders) throws java.io.IOException
java.io.IOException
public void close()
close
in interface AetherClient