You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mkdocs/docs/configuration.md
+22-21
Original file line number
Diff line number
Diff line change
@@ -19,27 +19,28 @@ Changing Unirest's config should ideally be done once, or rarely. Once Unirest h
19
19
20
20
## Config Options
21
21
22
-
| Builder Method | Impact | Default |
23
-
| ------------- | ------------- | ------------- |
24
-
|```connectTimeout(int)```| Sets the connection timeout for all requests in millis | 10000 |
25
-
|```proxy(proxy)```| Sets a proxy object for negotiating proxy servers. Can include auth credentials ||
26
-
|```setDefaultHeader(String, String)```| Sets a default header. Will overwrite if it exists ||
27
-
|```setDefaultHeader(String, Supplier<String>)```| Sets a default header by supplier. Good for setting trace tokens for microservice architectures. Will overwrite if it exists ||
28
-
|```addDefaultHeader(String, String)```| Adds a default header. Multiple for the same name can exist ||
29
-
|```addDefaultHeader(String, Supplier<String>)```| Add a default header by supplier. Good for setting trace tokens for microservice architectures. ||
30
-
|```setDefaultBasicAuth(String, String)```| Add a default Basic Auth Header ||
31
-
|```followRedirects(boolean)```| toggle following redirects | true |
32
-
|```enableCookieManagement(boolean)```| toggle accepting and storing cookies | true |
33
-
|```cookieSpec(String)```| set a cookie policy. Acceptable values: 'default' (same as Netscape), 'netscape', 'ignoreCookies', 'standard' (RFC 6265 interoprability profile) , 'standard-strict' (RFC 6265 strict profile) | default |
34
-
|```automaticRetries(boolean)```| toggle disabling automatic retries (up to 4 times) for socket timeouts | true |
|```clientCertificateStore(String,String)```| Add a PKCS12 KeyStore by path for doing client certificates ||
37
-
|```clientCertificateStore(KeyStore,String)```| Add a PKCS12 KeyStore for doing client certificates ||
38
-
|```connectionTTL(long,TimeUnit)```| Total time to live (TTL) defines maximum life span of persistent connections regardless of their expiration setting. No persistent connection will be re-used past its TTL value.| -1 |
39
-
|```connectionTTL(Duration)```| Add total time to live (TTL) by [Duration](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html). Good for moderns Java APIs. | -1 |
40
-
|```errorHandler(Consumer<HttpResponse<?>> consumer)```| Set a global error handler that will be invoked for any status > 400 or a parsing error ||
41
-
|```interceptor(Interceptor value)```| Set a global Interceptor handler that will be invoked before and after each request ||
42
-
|```defaultBaseUrl(String value)```| Set a default base URL to be used for all requests that do not already contain a scheme ||
|```connectTimeout(int)```| Sets the connection timeout for all requests in millis | 10000 |
25
+
|```requestTimeout(int)```| Sets the request timeout for all requests in millis | none (infinite) |
26
+
|```proxy(proxy)```| Sets a proxy object for negotiating proxy servers. Can include auth credentials ||
27
+
|```setDefaultHeader(String, String)```| Sets a default header. Will overwrite if it exists ||
28
+
|```setDefaultHeader(String, Supplier<String>)```| Sets a default header by supplier. Good for setting trace tokens for microservice architectures. Will overwrite if it exists ||
29
+
|```addDefaultHeader(String, String)```| Adds a default header. Multiple for the same name can exist ||
30
+
|```addDefaultHeader(String, Supplier<String>)```| Add a default header by supplier. Good for setting trace tokens for microservice architectures. ||
31
+
|```setDefaultBasicAuth(String, String)```| Add a default Basic Auth Header ||
32
+
|```followRedirects(boolean)```| toggle following redirects | true |
33
+
|```enableCookieManagement(boolean)```| toggle accepting and storing cookies | true |
34
+
|```cookieSpec(String)```| set a cookie policy. Acceptable values: 'default' (same as Netscape), 'netscape', 'ignoreCookies', 'standard' (RFC 6265 interoprability profile) , 'standard-strict' (RFC 6265 strict profile) | default |
35
+
|```automaticRetries(boolean)```| toggle disabling automatic retries (up to 4 times) for socket timeouts | true |
|```clientCertificateStore(String,String)```| Add a PKCS12 KeyStore by path for doing client certificates ||
38
+
|```clientCertificateStore(KeyStore,String)```| Add a PKCS12 KeyStore for doing client certificates ||
39
+
|```connectionTTL(long,TimeUnit)```| Total time to live (TTL) defines maximum life span of persistent connections regardless of their expiration setting. No persistent connection will be re-used past its TTL value. | -1 |
40
+
|```connectionTTL(Duration)```| Add total time to live (TTL) by [Duration](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html). Good for moderns Java APIs. | -1 |
41
+
|```errorHandler(Consumer<HttpResponse<?>> consumer)```| Set a global error handler that will be invoked for any status > 400 or a parsing error ||
42
+
|```interceptor(Interceptor value)```| Set a global Interceptor handler that will be invoked before and after each request ||
43
+
|```defaultBaseUrl(String value)```| Set a default base URL to be used for all requests that do not already contain a scheme ||
43
44
44
45
## Global Interceptor
45
46
You can set a global interceptor for your configuration. This is invoked before and after each request.
0 commit comments