Package | Description |
---|---|
kong.unirest | |
kong.unirest.apache |
Modifier and Type | Field and Description |
---|---|
protected Config |
RawResponseBase.config |
Modifier and Type | Method and Description |
---|---|
Config |
Config.addDefaultHeader(String name,
String value)
Add default header to appear on all requests
|
Config |
Config.addInterceptor(org.apache.http.HttpRequestInterceptor interceptor)
Add a HttpRequestInterceptor to the clients.
|
Config |
Config.addShutdownHook(boolean value)
Register the client with a system shutdown hook.
|
Config |
Config.asyncClient(AsyncClient value)
Set the full async configuration including monitors.
|
Config |
Config.asyncClient(java.util.function.Function<Config,AsyncClient> asyncClientBuilder)
Set the full async configuration including monitors.
|
Config |
Config.asyncClient(org.apache.http.nio.client.HttpAsyncClient value)
Set the asynchronous AbstractHttpAsyncClient implementation to use for every asynchronous request
|
Config |
Config.automaticRetries(boolean value)
Automaticly retry certain recoverable errors like socket timeouts.
|
Config |
Config.clearDefaultHeaders()
Clear default headers
|
Config |
Config.clientCertificateStore(KeyStore store,
String password)
Set a custom keystore
|
Config |
Config.clientCertificateStore(String fileLocation,
String password)
Set a custom keystore via a file path.
|
Config |
Config.concurrency(int total,
int perRoute)
Set the concurrency levels
|
static Config |
Unirest.config()
Access the default configuration for the primary Unirest instance.
|
Config |
UnirestInstance.config()
Access the default configuration for the primary Unirest instance.
|
Config |
Config.connectionTTL(long duration,
TimeUnit unit)
Total time to live (TTL) defines maximum life span of persistent connections regardless of their expiration setting.
|
Config |
Config.connectTimeout(int inMillies)
Set the connection timeout
|
Config |
Config.cookieSpec(String policy)
Sets a cookie policy
Acceptable values:
'default' (same as Netscape),
'netscape',
'ignoreCookies',
'standard' (RFC 6265 interoprability profile) ,
'standard-strict' (RFC 6265 strict profile)
|
Config |
Config.enableCookieManagement(boolean enable)
Allow the client to manage cookies.
|
Config |
Config.followRedirects(boolean enable)
Allow the client to follow redirects.
|
Config |
RawResponse.getConfig() |
Config |
RawResponseBase.getConfig() |
Config |
Config.httpClient(Client httpClient)
Set the HttpClient implementation to use for every synchronous request
|
Config |
Config.httpClient(java.util.function.Function<Config,Client> httpClient)
Provide a builder for a client
|
Config |
Config.httpClient(org.apache.http.client.HttpClient httpClient)
Deprecated.
|
Config |
Config.instrumentWith(UniMetric metric)
Add a metric object for instrumentation
|
Config |
Config.proxy(Proxy value)
Set a proxy
|
Config |
Config.proxy(String host,
int port)
Set a proxy
|
Config |
Config.proxy(String host,
int port,
String username,
String password)
Set an authenticated proxy
|
Config |
Config.requestCompression(boolean value)
Turn on or off requesting all content as compressed.
|
Config |
Config.reset()
Shutdown the current config and re-init.
|
Config |
Config.setDefaultBasicAuth(String username,
String password)
Default basic auth credentials
|
Config |
Config.setDefaultHeader(String name,
String value)
Set default header to appear on all requests
|
Config |
Config.setDefaultHeader(String name,
java.util.function.Supplier<String> value)
Set default header to appear on all requests, value is through a Supplier
This is useful for adding tracing elements to requests.
|
Config |
Config.setDefaultResponseEncoding(String value)
Set the default encoding that will be used for serialization into Strings.
|
Config |
Config.setObjectMapper(ObjectMapper om)
Set the ObjectMapper implementation to use for Response to Object binding
|
Config |
Config.socketTimeout(int inMillies)
Set the socket timeout
|
Config |
Config.useSystemProperties(boolean value)
Tell the HttpClients to use the system properties for things like proxies
|
Config |
Config.verifySsl(boolean value)
Toggle verifying SSL/TLS certificates.
|
Modifier and Type | Method and Description |
---|---|
Config |
Config.asyncClient(java.util.function.Function<Config,AsyncClient> asyncClientBuilder)
Set the full async configuration including monitors.
|
Config |
Config.httpClient(java.util.function.Function<Config,Client> httpClient)
Provide a builder for a client
|
Constructor and Description |
---|
RawResponseBase(Config config) |
UnirestInstance(Config config)
Create a new UnirestInstance with a config
|
Modifier and Type | Method and Description |
---|---|
AsyncClient |
ApacheAsyncClient.Builder.apply(Config config) |
Client |
ApacheClient.Builder.apply(Config config) |
Constructor and Description |
---|
ApacheAsyncClient(Config config) |
ApacheAsyncClient(org.apache.http.nio.client.HttpAsyncClient client,
Config config) |
ApacheAsyncClient(org.apache.http.nio.client.HttpAsyncClient client,
Config config,
org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager manager,
AsyncIdleConnectionMonitorThread monitor)
Deprecated.
|
ApacheClient(Config config) |
ApacheClient(org.apache.http.client.HttpClient httpClient,
Config config) |
ApacheClient(org.apache.http.client.HttpClient httpClient,
Config config,
org.apache.http.impl.conn.PoolingHttpClientConnectionManager clientManager,
SyncIdleConnectionMonitorThread connMonitor)
Deprecated.
|
Copyright © 2019. All rights reserved.