I want to use a simple HttpClient.
However, it appears sun.net.www.http.HttpClient
is inaccessible.
Also, com.ibm.ws.http.HTTPConnection
- appears to be more supporting of http server and not client. Why? Because when I create an instance of HttpConnection, it has a "getHttpResponse" to which I am supposed to write.
Anyway to use the IBM HttpConnection for HttpClient?
Or, is there any standard httpClient code that I can use?
Many people use Apache's HTTPClient.
Have a look at the first few chapters of its tutorial to see if it's what you're looking for.
If you're after something simple that's already built into Java, you can look at HttpURLConnection, which you can use to build HTTP requests (example). If you need to do anything more than just simple HTTP requests, though, HTTPClient is probably the way to go.