OkHttp Example to test Rest API Service
Add the following to your dependencies:
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.9.0</version>
</dependency>
In this project I am using a sample rest api service : https://jsonplaceholder.typicode.com/