Uses of Class
kong.unirest.core.Config
Packages that use Config
-
Uses of Config in kong.unirest.core
Fields in kong.unirest.core declared as ConfigModifier and TypeFieldDescriptionprotected ConfigRawResponseBase.configprotected final ConfigWebSocketRequestImpl.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.authenticator(Authenticator auth) Sets a authenticator object for the clientConfig.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 ConfigUnirest.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. this is overridden if the url contains a valid base already the url may contain path params for example.Config.disableHostNameVerification(boolean enabled) Sets the system property jdk.internal.httpclient.disableHostnameVerification Disables or enables HostNameVerification for the ENTIRE JVM.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.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 proxyConfig.proxy(ProxySelector value) Set a proxy selector.Set a proxy This will set any ProxySelector object already set to null and take over all proxy workConfig.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 TypeMethodDescriptiondefault HttpResponse<?> Interceptor.onFail(Exception e, HttpRequestSummary request, Config config) Called in the case of a total failure.default voidInterceptor.onRequest(HttpRequest<?> request, Config config) Called just before a request.default voidInterceptor.onResponse(HttpResponse<?> response, HttpRequestSummary request, Config config) Called just after the 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 ConfigModifierConstructorDescriptionprotectedRawResponseBase(Config config, HttpRequestSummary summary) SseRequestImpl(Config config, String url) UnirestInstance(Config config) Create a new UnirestInstance with a configWebSocketRequestImpl(Config config, String url) -
Uses of Config in kong.unirest.core.java
Constructors in kong.unirest.core.java with parameters of type ConfigModifierConstructorDescriptionConstructor used by unirest which includes the Unirest config which uis used for event serializationJavaClient(Config config) JavaClient(Config config, HttpClient client)