public final class HttpSettings extends Object
Constructor and Description |
---|
HttpSettings()
Instantiates a new http settings.
|
Modifier and Type | Method and Description |
---|---|
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.
|
ContentFormat |
getContentFormat()
Gets the content format.
|
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) |
HttpHeaders |
headers() |
HttpSettings |
headers(HttpHeaders headers) |
HttpSettings |
headers(Map<String,Object> headers) |
HttpSettings |
headers(String name1,
Object value1,
String name2,
Object value2) |
HttpSettings |
headers(String name1,
Object value1,
String name2,
Object value2,
String name3,
Object value3) |
boolean |
isOneWayRequest()
Checks if is one way request.
|
HttpSettings |
isOneWayRequest(boolean isOneWayRequest)
Checks if is one way request.
|
HttpSettings |
setConnectionTimeout(int connTimeout)
Note: Only for
HttpClient , not for OKHttpClient . |
HttpSettings |
setContentFormat(ContentFormat contentFormat)
Sets the content format.
|
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 connTimeout)
HttpClient
, not for OKHttpClient
.connTimeout
- 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 header(String name, Object value)
name
- value
- public HttpSettings headers(String name1, Object value1, String name2, Object value2)
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
- public HttpSettings headers(Map<String,Object> headers)
headers
- public HttpSettings headers(HttpHeaders headers)
headers
- public HttpHeaders headers()
public HttpSettings copy()
Copyright © 2019. All rights reserved.