Create Rest client using HttpClient 3 api

Posted Posted in Java, REST, WebServices

This code snippet uses HttpClient 3 api (HttpClient 3.0.1 jar) to invoke a REST based web service. It assumes the request is in JSON format and response is needed in JSON format. The code would require the Rest service url that we need to connect to… let’s call it serviceURL. Also, let’s assume the json […]