| Constructor and Description |
|---|
HttpSettings() |
| Modifier and Type | Method and Description |
|---|---|
HttpSettings |
basicAuth(String user,
Object password) |
HttpSettings |
copy() |
static HttpSettings |
create() |
boolean |
doInput() |
HttpSettings |
doInput(boolean doInput)
Note: Only for
HttpClient, not for OKHttpClient. |
boolean |
doOutput() |
HttpSettings |
doOutput(boolean doOutput)
Note: Only for
HttpClient, not for OKHttpClient. |
int |
getConnectionTimeout()
Gets the connection timeout.
|
String |
getContentEncoding() |
ContentFormat |
getContentFormat()
Gets the content format.
|
String |
getContentType() |
int |
getReadTimeout()
Gets the read timeout.
|
SSLSocketFactory |
getSSLSocketFactory()
Gets the SSL socket factory.
|
boolean |
getUseCaches()
Gets the use caches.
|
HttpSettings |
header(String name,
Object value)
Set http header specified by
name/value. |
HttpHeaders |
headers() |
HttpSettings |
headers(HttpHeaders headers)
Removes all headers on this
HttpSettings and adds headers. |
HttpSettings |
headers(Map<String,?> headers)
Set http headers specified by the key/value entities from
Map. |
HttpSettings |
headers(String name1,
Object value1,
String name2,
Object value2)
Set http headers specified by
name1/value1, name2/value2. |
HttpSettings |
headers(String name1,
Object value1,
String name2,
Object value2,
String name3,
Object value3)
Set http headers specified by
name1/value1, name2/value2, name3/value3. |
boolean |
isOneWayRequest()
Checks if is one way request.
|
HttpSettings |
isOneWayRequest(boolean isOneWayRequest)
Checks if is one way request.
|
HttpSettings |
setConnectionTimeout(int connectionTimeout)
Note: Only for
HttpClient, not for OKHttpClient. |
HttpSettings |
setContentEncoding(String contentEncoding) |
HttpSettings |
setContentFormat(ContentFormat contentFormat)
Sets the content format.
|
HttpSettings |
setContentType(String contentType) |
HttpSettings |
setReadTimeout(int readTimeout)
Note: Only for
HttpClient, not for OKHttpClient. |
HttpSettings |
setSSLSocketFactory(SSLSocketFactory sslSocketFactory)
Sets the SSL socket factory.
|
HttpSettings |
setUseCaches(boolean useCaches)
Note: Only for
HttpClient, not for OKHttpClient. |
String |
toString() |
public static HttpSettings create()
public int getConnectionTimeout()
public HttpSettings setConnectionTimeout(int connectionTimeout)
HttpClient, not for OKHttpClient.connectionTimeout - public int getReadTimeout()
public HttpSettings setReadTimeout(int readTimeout)
HttpClient, not for OKHttpClient.readTimeout - public SSLSocketFactory getSSLSocketFactory()
public HttpSettings setSSLSocketFactory(SSLSocketFactory sslSocketFactory)
sslSocketFactory - public boolean getUseCaches()
public HttpSettings setUseCaches(boolean useCaches)
HttpClient, not for OKHttpClient.useCaches - public boolean doInput()
URLConnection.setDoInput(boolean)public HttpSettings doInput(boolean doInput)
HttpClient, not for OKHttpClient.doInput - URLConnection.setDoInput(boolean)public boolean doOutput()
URLConnection.setDoOutput(boolean)public HttpSettings doOutput(boolean doOutput)
HttpClient, not for OKHttpClient.doOutput - URLConnection.setDoOutput(boolean)public boolean isOneWayRequest()
public HttpSettings isOneWayRequest(boolean isOneWayRequest)
isOneWayRequest - public ContentFormat getContentFormat()
public HttpSettings setContentFormat(ContentFormat contentFormat)
contentFormat - public HttpSettings setContentType(String contentType)
public String getContentType()
public HttpSettings setContentEncoding(String contentEncoding)
public String getContentEncoding()
public HttpSettings basicAuth(String user, Object password)
user - password - public HttpSettings header(String name, Object value)
name/value.
If this HttpSettings already has any headers with that name, they are all replaced.name - value - public HttpSettings headers(String name1, Object value1, String name2, Object value2)
name1/value1, name2/value2.
If this HttpSettings already has any headers with that name, they are all replaced.name1 - value1 - name2 - value2 - public HttpSettings headers(String name1, Object value1, String name2, Object value2, String name3, Object value3)
name1/value1, name2/value2, name3/value3.
If this HttpSettings already has any headers with that name, they are all replaced.name1 - value1 - name2 - value2 - name3 - value3 - public HttpSettings headers(Map<String,?> headers)
Map.
If this HttpSettings already has any headers with that name, they are all replaced.headers - public HttpSettings headers(HttpHeaders headers)
HttpSettings and adds headers.headers - public HttpHeaders headers()
public HttpSettings copy()
Copyright © 2021. All rights reserved.