Skip to content
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

309 lines (243 sloc) 13.1 KB


  • Update of jackson-databind for CVE-2019-12814


  • #284 allow setting a custom factory for the RequestConfig


  • #282 force maven not to pick the async clients version of client


  • #280 regular Apache client not picking up max connections


  • Updated dependencies to latest, including Apache Http Client (4.5.9)


  • Unriest is now packaged both as a traditional jar and as a standalone jar with all of it's dependencies shaded. This is nice when you have a large project where many components may use different versions of things like Apache Http Client.


  • Remove mistaken dependency that should have been scoped to test.


  • Update Jackson dependency in object-mapper-jackson due to security.


  • #267 make sure hooks are registered regardless of where we are in the lifecycle of the client engines
  • #264 Adds a metric hook for observing the health and performance of unirest.
  • #270 Throw a more helpful error when a older version of Apache Client has been pulled in over Unirest's requirement.
  • Upgrade Apache Http Client Dependency to 4.5.8


  • Add a mapper function to transform a HttpResponse to a HttpResponse
HttpResponse<Integer> response = Unirest.get("http://someplace/number")
  • Add a few ways to map a error response into a different type than the original
ErrorThing error = Unirest.get("http://someplace")
                .mapError(ErrorThing.class); // will be null if the request had been successful

                .ifFailure(ErrorThing.class, f -> {
                    // f is a HttpResponse<ErrorThing> 
                    // this function is not called if the request was succesful


  • add cookiespec policies to config. These are the same as Apache Http Clients cookiespec. See org.apache.http.client.config.CookieSpec


  • Introduce default implementations of popular object mappers
    • Jackson
    • GSON


  • Finally address #26 You can add a file upload progress monitor. This monitor will get called for each file in a multipart file upload by name."http://someplace")
           .field("myFile", new File("/file/somthing.tar")
           .uploadMonitor((fieldName, fileName, bytesWritten, totalBytes) -> {
                // draw a upload progress bar or something
  • Fix an issue where when using generic methods that take object, passing in complex objects like InputStreams would not get send as the correct type.


  • #120 support client certificates. You can pass in an entire keystore or just the path to it in the config.
  • part of #260: only support a single basic auth header.


  • #260 add option to configure a default basic auth header


  • #259 optionally flag the config to auto register the clients with shutdownhooks.
  • #165 allow forcing a simple url-encoded param POST/PUT to be multipart. This adds a new method to the body interface so bumping the minor.


  • #118 enable overriding socket and connection timeouts per request
  • #72 enable passing a proxy per request. Only works with simple proxies for now.


  • Disable SSL validation with Unirest.config().verifySsl(false). PLEASE DO NOT DO THIS IN PRODUCTION
  • Disable Automatic retries with Unirest.config().automaticRetries(false)


  • Make sure the GzipInputStream gets closed.
  • Support disabling compressed results which is asked for by default


  • Pass route params as a map
       .routeParam(ImmutableMap.of("cheese", "cheddar", "age", 42))

The following were releases from the merged OpenUnirest project


  • Add a noop response type when you just don't care about the body.
   HttpResponse re = Unirest.get("http://no.body.knows").asEmpty();


  • Add the ability to follow a paged response by providing a lambda for the response type and one for getting the next page. It will stop once the next link is null or empty.
  • The PagedList has handy dandy methods to pass consumers to all success and failure responses.
PagedList<JsonNode> result =  Unirest.get("http://and.pagey")
                        r -> r.asJson(),
                        r -> r.getHeaders().getFirst("nextPage")


  • Pulled isSuccess() up to the response interface so it can be used and enjoyed by everyone.


  • Add the ability to make requests to non-standard web methods for things like WebDAV, SVN, or other horrible things.
   Unirest.request("CHEESE", "http://some.cheesy.thing")


  • Slight breaking change with regard to accessing Apache specific classes via the config
    • getClient and getAsyncClient return the Unirest containers for clients. You can still get to the Apache client through that for now but this is also deprecated. Eventually Unirest will make Apache just one of several modules.
    • Apache client wrappers are now package local.
  • Add support for overriding the default expected encoding both on a per-request basis and as a default in the config.
// Changing the default from UTF-8 for all requests
// Unirest will still honor content-encoding if defined in the response headers

// Changing the default on a request. 
// This will explicitly be used EVEN IF the headers define something else.


  • access headers in order


  • UnirestInstance is autoclosable


  • Adds chainable ifSuccess and ifFailure consumer methods to the response. Now you can handle the response like
                .ifSuccess(r ->"Yippy!"))
                .ifFailure(r -> log.error("Booo"));


  • Allow the configuration of header suppliers.
   Unirest.config().setDefaultHeader("trace", () -> value);


  • distinguish between set and add for default headers.


  • add method to replace a header rather than append to it.


  • Now you can stream the results into a file!
    • It doesn't need to be a file either. It could be any result. Unirest will shove it in a file.
File file = Unirest.get("https://someplace/file.tar.gz")


  • When encountering a parsing error with asObject or asJson capture the body in a UnirestParsingException
  • New BETA feature asFile method to stream the response into a file.


  • Detect if the async client has stopped for some reason and construct a new one. This one may be different from the one that was originally configured so we need to add a way to configure a supplier for clients rather than a direct client.


  • Deprecate methods that expose Apache. In the 4 line we will start supporting other clients. Primarily the java one supplied in Java9 (apache will still exist for 8-)
  • Add several functional methods for dealing with the raw response before the connection is closed. This is nice for large responses.


  • Parsing handler should capture unirest exceptions just like other exceptions.



  • Add support for the authenticated proxies to the async client


  • Support for authenticated proxies with Unirest.config().proxy("", 80, "username","password")


  • This is a major release with several breaking changes which (other than the namespace change) should ONLY impact you if you are using some of Unirests more advanced features or custom configurations.
  • The maven artifact has changed to open-unirest-java
  • The namespace has been shortened to just unirest (inspired by Java Spark)
  • The configuration system has been completely redone. Previously it was scattered across several classes and was entirely static. The new system has instances and supports multiple configurations. See the for details.
    • Start accessing the config with Unirest.config()
  • Almost everything is now fronted by interfaces, this makes testing easier.
  • Unirest itself can now be accessed as a interface with UnirestInstance
  • ObjectMappers can be passed in as part of the builder.
  • option no longer supports body (per http spec)
  • Accept and ContentType are now 1st class headers in the builder (Unirest.get(path).accept("application/json"))
  • Major internal fixes so that which builder operations were available when is consistent.


  • Lazy init the HttpClients so they don't get in the way of setting custom clients.


  • More safety for issue #41


  • Fix Issue #41: possible init error in HttpClient under heavy load


  • Extracted Interface for HttpResponse to make testing easier


  • Updated org.json dependency


  • Add async versions of generic type methods


  • Issue #19 Add support for generic types with object mappers.


            .add("/fruits/-", "Apple")
            .replace("/lastname", "Flintsone")
            .test("/firstname", "Fred")
            .move("/old/location", "/new/location")
            .copy("/original/location", "/new/location")


  • Add optional flag overload to Unirest.shutDown(false). The flag indicates if the various Options should be cleared. This only applies to options that could survive a shutdown. The HttpClients and thread monitors will still be discarded.


  • Change default MultiPart mode to BROWSER_COMPATIBLE in order to support unicode filenames. Clients wishing to use the legacy mode can set it to STRICT. This should not be a problem for most users as few servers today lack support for unicode file names. Issue #35



  • add an option to disable cookie management with Options.enableCookieManagement(false).
  • In the future ignoring cookies will be the default.


  • Fix init error


  • added ability to turn off redirect following with Options.followRedirects(boolean enable) (default is true)


  • Add .charset(Charset charset) to POSTS (both form and body)
  • Clean up some ambiguous methods in form posting. This may be a breaking change for a very small number of users. There are better methods for handling these cases.
  • Added the ability to add HttpRequestInterceptors to the client. Though Options.addInterceptor(new TestInterceptor());


  • Expose the Options.init() method to restore the system to a fresh start after a shutdown.
  • Unirest.shutdown() no longer throws a checked exception


  • Fix NPE with null bodies from HEAD requests.


  • Quitly consume and close InputStreams that may not be complete.


  • Major refactoring of how response objects are built. This internalizes HttpClientHelper which was previously public but not needed if you were using the library in in the expected way. This refactoring sets up the library for future work to extend the number of supported formats and for greater expression in the methods for those formats.
  • Additional of functional map methods to HttpResponse so you don't have to stop the flow for further transformations.
  • Update the org.json dependency
  • Fixed issue with achor hashes in URLs (#17)
  • Fixed NPE in passing args as maps (#20)


  • JSON parsing errors no longer just throw out of asJson but are captured and can be inspected via HttpResponse::getParsingError. This resolves the fact that most API's do not return valid JSON for non-200 status codes.
  • Return CompletableFuture rather that boring old Futures for all async methods.


  • UnirestException is no longer checked
  • Namespaces have been migrated to new io.gitgub.openunirest namespace
  • Thread leak in Options fixed
You can’t perform that action at this time.