public class HttpClient
extends java.lang.Object
| Constructor and Description |
|---|
HttpClient(Environment environment) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInjector(Injector injector) |
<T> HttpResponse<T> |
execute(HttpRequest<T> request) |
protected int |
getConnectTimeout()
Override this method in a custom subclass to use a custom connect timeout value.
|
Encoder |
getEncoder() |
protected Environment |
getEnvironment() |
protected int |
getReadTimeout()
Override this method in a custom subclass to use a custom read timeout value.
|
protected javax.net.ssl.SSLSocketFactory |
getSSLSocketFactory()
Override this method in a custom subclass to use a SSLSocketFactory.
|
protected java.lang.String |
getUserAgent()
Override this method in a custom subclass to use a User Agent.
|
void |
setConnectTimeout(int connectTimeout) |
void |
setReadTimeout(int readTimeout) |
void |
setSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory) |
void |
setUserAgent(java.lang.String userAgent) |
public HttpClient(Environment environment)
protected int getConnectTimeout()
protected int getReadTimeout()
protected javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
protected java.lang.String getUserAgent()
public Encoder getEncoder()
protected Environment getEnvironment()
public void setSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory)
public void setUserAgent(java.lang.String userAgent)
public void setConnectTimeout(int connectTimeout)
public void setReadTimeout(int readTimeout)
public void addInjector(Injector injector)
public <T> HttpResponse<T> execute(HttpRequest<T> request) throws java.io.IOException
java.io.IOException