One virtue of RESTful web services is that clients can be very simple and you dont need any special toolkit.
Once you have got the correct URL and HTTP method to address the service you can create a HttpURLConnection to make the request and get the response. See the JavaDocs in the java.net package.
One important point: if your URL starts with "http://" then the URL openConnection returns a HttpURLConnection - a subclass of URLConnection so you need to look at the JavaDocs for both. Setting the request method to "GET" or "POST" uses an HttpURLConnection method.
You might also search for "HttpURLConnection tutorial."
Joined: Jun 29, 2005
Thank you Bill.
I tried to create the connection as:
URL myURL = new URL("http://localhost/ats/rest/MyService/getData");//MyService is service and getData is method HttpURLConnection myConnection = (HttpURLConnection) myURL.openConnection();