The Hypertext Transfer Protocol (HTTP) is ubiquitous; this protocol is at the core
of important technologies such as the World Wide Web (WWW), the Simple Object Access Protocol (SOAP), XML databases, content management systems, WebDAV, and, most
importantly, iTunes. Much of the world's business is accomplished over
HTTP in some form or another, and if this protocol were to suddenly
vanish, a sizable portion of the world economy would vanish with it. Given
this ubiquity, it is likely that you've had occasion to write a Java
program that needed to fetch a web page or interact with a servlet or CGI
script. While the J2SE contains some rudimentary tools to communicate via
HTTP, the feature set of URLConnection
is somewhat limited. This chapter introduces Apache HttpClient, a set of
utilities that simplifies the task of retrieving and sending information
over HTTP.
Apache HttpClient grew up in the Jakarta Commons, and until April 2004 it was a Commons project. It subsequently graduated to a full Jakarta project, and as Jakarta was dismantled, it became an Apache top-level project. This chapter refers to HttpClient as Apache HttpClient, but you should be aware that most of the documentation and support still refer to the project as Commons HttpClient.