From 7b7e6e473f85cae061d02dcf71126c85c01deb99 Mon Sep 17 00:00:00 2001 From: Ryan Bergman Date: Fri, 1 Nov 2024 07:28:44 -0500 Subject: [PATCH] update documentation --- CHANGELOG.md | 6 ++++++ README.md | 2 +- docs/index.md | 5 +---- .../test/java/kong/unirest/core/UnirestInstanceTest.java | 2 ++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c70bb773..cf58157a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 4.4.5 +* Issue #536 UnirestInstance should implement AutoCloseable + +## 4.4.4 +* issue #528 reset content headers when multiPartContent is called + ## 4.4.0 * Issue #526 split connection timeout from request timeout. The request no longer has a connection timeout setting, and instead has a request timeout setting as a replacement. Previously these two settings had been conflated. The overall config also has a default request timeout that will be applied to all requests if the request setting is not set. The default setting is null which indicates a infinite timeout. diff --git a/README.md b/README.md index 8222ceb3..9a4110bc 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ You can use a maven bom to manage the modules: com.konghq unirest-java-bom - 4.4.0 + 4.4.5 pom import diff --git a/docs/index.md b/docs/index.md index bf28dd7e..1d53f648 100644 --- a/docs/index.md +++ b/docs/index.md @@ -50,7 +50,7 @@ rightmenu: true com.konghq unirest-java-bom - 4.3.0 + 4.4.5 pom import @@ -578,7 +578,6 @@ Changing Unirest's config should ideally be done once, or rarely. Once Unirest h | ```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 | | ```automaticRetries(boolean)``` | toggle disabling automatic retries (up to 4 times) for socket timeouts | true | | ```verifySsl(boolean)``` |toggle enforcing SSL | true | -| ```addShutdownHook(boolean)``` | toggle to add the clients to the system shutdown hooks automatically | false | | ```clientCertificateStore(String,String)``` | Add a PKCS12 KeyStore by path for doing client certificates | | | ```clientCertificateStore(KeyStore,String)``` | Add a PKCS12 KeyStore for doing client certificates | | | ```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 | @@ -609,8 +608,6 @@ As usual, Unirest maintains a primary single instance. Sometimes you might want UnirestInstance unirest = Unirest.spawnInstance(); ``` -**WARNING!** If you get a new instance of unirest YOU are responsible for shutting it down when the JVM shuts down. It is not tracked or shut down by ```Unirest.shutDown();``` - ## Object Mappers Unirest offers a few different Object Mapper's based on popular JSON libraries (Jackson and GSON). ```xml diff --git a/unirest/src/test/java/kong/unirest/core/UnirestInstanceTest.java b/unirest/src/test/java/kong/unirest/core/UnirestInstanceTest.java index b93d0e8f..86e7dae5 100644 --- a/unirest/src/test/java/kong/unirest/core/UnirestInstanceTest.java +++ b/unirest/src/test/java/kong/unirest/core/UnirestInstanceTest.java @@ -39,5 +39,7 @@ void canBeUsedWithTryWithResource() { try(UnirestInstance instance = mock){ } verify(mock).close(); + + Unirest.shutDown(); } } \ No newline at end of file