Uses of Class
kong.unirest.core.Config
Packages that use Config
-
Uses of Config in kong.unirest.core
Subclasses of Config in kong.unirest.coreModifier and TypeClassDescriptionclass
A Mock Config that will not actually start up any real clients.Fields in kong.unirest.core declared as ConfigModifier and TypeFieldDescriptionprotected final Config
BaseRequest.config
private final Config
BaseResponse.config
private final Config
MockRawResponse.config
protected Config
RawResponseBase.config
private final Config
UnirestInstance.config
protected final Config
WebSocketRequestImpl.config
Fields in kong.unirest.core with type parameters of type ConfigMethods in kong.unirest.core that return ConfigModifier and TypeMethodDescriptionConfig.addDefaultCookie
(String name, String value) Adds a default cookie to be added to all requests with this configConfig.addDefaultCookie
(Cookie cookie) Adds a default cookie to be added to all requests with this configConfig.addDefaultHeader
(String name, String value) Add default header to appear on all requestsConfig.cacheResponses
(boolean value) Enable Response Caching with default optionsConfig.cacheResponses
(Cache.Builder value) Enable Response Caching with custom optionsSet a custom array of ciphersConfig.clearDefaultHeaders()
Clear default headersConfig.clientCertificateStore
(String fileLocation, String password) Set a custom keystore via a file path.Config.clientCertificateStore
(KeyStore store, String password) Set a custom keystorestatic Config
Unirest.config()
Access the default configuration for the primary Unirest instance.UnirestInstance.config()
Access the default configuration for the primary Unirest instance.Config.connectionTTL
(long duration, TimeUnit unit) Sets the jdk.httpclient.keepalive.timeout setting https://docs.oracle.com/en/java/javase/20/docs/api/java.net.http/module-summary.html The number of seconds to keep idle HTTP connections alive in the keep alive cache.Config.connectionTTL
(Duration duration) Sets the jdk.httpclient.keepalive.timeout setting https://docs.oracle.com/en/java/javase/20/docs/api/java.net.http/module-summary.html The number of seconds to keep idle HTTP connections alive in the keep alive cache.Config.connectTimeout
(int inMillies) Sets the connect timeout duration for this client.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.defaultBaseUrl
(String value) set a default base url for all routes.Config.enableCookieManagement
(boolean enable) Allow the client to manage cookies.Sets a custom executor for requestsConfig.followRedirects
(boolean enable) Allow the client to follow redirects.MockRawResponse.getConfig()
RawResponse.getConfig()
Returns the current config for this request/responseRawResponseBase.getConfig()
Config.httpClient
(Function<Config, Client> httpClient) Provide a builder for a clientConfig.httpClient
(Client httpClient) Set the HttpClient implementation to use for every synchronous requestConfig.instrumentWith
(UniMetric metric) Add a metric object for instrumentationConfig.interceptor
(Interceptor value) Add a Interceptor which will be called before and after the request;Set a custom array of protocolsSet a proxySet an authenticated proxySet a proxyConfig.requestCompression
(boolean value) Turn on or off requesting all content as compressed.Config.requestTimeout
(Integer inMillies) Sets a default timeout for all requests.Config.reset()
Shutdown the current config and re-init.Config.retryAfter
(boolean value) Automatically retry synchronous requests on 429/529 responses with the Retry-After response header Default is falseConfig.retryAfter
(boolean value, int maxRetryAttempts) Automatically retry synchronous requests on 429/529 responses with the Retry-After response header Default is falseConfig.retryAfter
(RetryStrategy strategy) Automatically retry synchronous requests on 429/529 responses with the Retry-After response header Default is falseConfig.setDefaultBasicAuth
(String username, String password) Default basic auth credentialsConfig.setDefaultHeader
(String name, String value) Set default header to appear on all requestsConfig.setDefaultHeader
(String name, 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.setDefaultResponseEncoding
(String value) Set the default encoding that will be used for serialization into Strings.Config.setObjectMapper
(ObjectMapper om) Set the ObjectMapper implementation to use for Response to Object bindingConfig.sslContext
(SSLContext ssl) Set a custom SSLContext.Config.useSystemProperties
(boolean value) Tell the HttpClients to use the system properties for things like proxiesConfig.verifySsl
(boolean value) Toggle verifying SSL/TLS certificates.Config.version
(HttpClient.Version value) Requests a specific HTTP protocol version where possible.Methods in kong.unirest.core with parameters of type ConfigModifier and TypeMethodDescription(package private) RawResponse
Routes.exchange
(HttpRequest request, Config config) private ObjectMapper
ExpectedResponseRecord.getObjectMapper
(HttpRequest request, Config config) (package private) RawResponse
Invocation.getResponse
(Config config, HttpRequest request) HttpResponse
<?> CompoundInterceptor.onFail
(Exception e, HttpRequestSummary request, Config config) HttpResponse
<?> DefaultInterceptor.onFail
(Exception e, HttpRequestSummary request, Config config) default HttpResponse
<?> Interceptor.onFail
(Exception e, HttpRequestSummary request, Config config) Called in the case of a total failure.void
CompoundInterceptor.onRequest
(HttpRequest<?> request, Config config) default void
Interceptor.onRequest
(HttpRequest<?> request, Config config) Called just before a request.void
CompoundInterceptor.onResponse
(HttpResponse<?> response, HttpRequestSummary request, Config config) void
DefaultInterceptor.onResponse
(HttpResponse<?> response, HttpRequestSummary request, Config config) default void
Interceptor.onResponse
(HttpResponse<?> response, HttpRequestSummary request, Config config) Called just after the request.ExpectedResponseRecord.toRawResponse
(Config config, HttpRequest request) ResponseBuilder.toRawResponse
(Config config, HttpRequest request) Method parameters in kong.unirest.core with type arguments of type ConfigModifier and TypeMethodDescriptionConfig.httpClient
(Function<Config, Client> httpClient) Provide a builder for a clientConstructors in kong.unirest.core with parameters of type ConfigModifierConstructorDescription(package private)
BaseRequest
(Config config, HttpMethod method, String url) HttpRequestBody
(Config config, HttpMethod method, String url) (package private)
HttpRequestJsonPatch
(Config config, String url) (package private)
HttpRequestNoBody
(Config config, HttpMethod method, String url) MockRawResponse
(String responseBody, Headers responseHeaders, int status, String statusMessage, Config config, HttpRequestSummary summary) protected
RawResponseBase
(Config config, HttpRequestSummary summary) UnirestInstance
(Config config) Create a new UnirestInstance with a configWebSocketRequestImpl
(Config config, String url) Constructor parameters in kong.unirest.core with type arguments of type Config -
Uses of Config in kong.unirest.core.java
Fields in kong.unirest.core.java declared as ConfigMethods in kong.unirest.core.java with parameters of type ConfigModifier and TypeMethodDescriptionprivate void
JavaClientBuilder.configureTLSOptions
(Config config, HttpClient.Builder builder) private SSLContext
JavaClientBuilder.getSslContext
(Config config) private HttpClient.Redirect
JavaClientBuilder.redirectPolicy
(Config config) Constructors in kong.unirest.core.java with parameters of type ConfigModifierConstructorDescriptionJavaClient
(Config config) JavaClient
(Config config, HttpClient client) JavaResponse
(HttpResponse<InputStream> response, Config config, HttpRequestSummary summary)