I’m basically trying to follow what everyone else is saying (http://hc.apache.org/httpclient-3.x/tutorial.html) to do to use the Apache HttpClient (http://hc.apache.org/index.html) API to ‘login’ to a site. Everyone else is importing “org.apache.commons.httpclient.HttpClient”. Mine doesn’t have that import, only stuff like “org.apache.http.client”. Nowhere can I find the API which has their methods in it, so their code won’t work for me. Does anyone know where I can get this different (external jar) file? If not, does anyone know how I can use the one I’ve got? Their tutorial fails for me. Thanks
I’m basically trying to follow what everyone else is saying ( http://hc.apache.org/httpclient-3.x/tutorial.html ) to
Share
The “org.apache.commons.httpclient.HttpClient” is the 3.x (back when it was Jakarta commons) and is the tutorial that you are looking at. The “org.apache.http.client” stuff is the newer 4.x version (HTTP Components). Try this page: http://hc.apache.org/httpcomponents-client-ga/tutorial/html/
From the apache HTTP Components page: