In this recipe, we will make use of the Unirest HTTP (http://unirest.io/java.html) Java library to access HTTP services. Unirest Java is a library based on Apache's HTTP client library and provides a fluent API for making HTTP requests.
Making an HTTP request using the Unirest HTTP client library
Getting ready
As the Java library is not modular, we will make use of the concept of automatic modules, as explained in Chapter 3, Modular Programming. The JARs belonging to the library are placed on the module path of the application, and the application then declares a dependency on the JARs by using the name of the JAR as its module name. This way, a JAR file automatically becomes a module and is hence called an automatic...