User Documentation
You are a user of HttpComponents if you are developing an application that makes use of our libraries. The documentation linked here is meant to help you understand how to use these libraries.
The General Information section points to documentation that is mostly API agnostic. Here you will find information that is useful, no matter whether you are using the new HttpComponents, or the Commons HttpClient 3.1, or even the standard Java HttpUrlConnection. Of course we put no emphasis on the latter.
The API Specific Information section points to documentation for specific APIs, either the new HttpComponents, or the Commons HttpClient 3.1. Using the information there with other APIs will be tricky, if not impossible.
General Information
If you are just getting started, you'll probably start by retrieving some pages from a web server. The Primer will give you valuable information for that. Once you are tackling more specific use cases, such as sending parameters to a servlet, or configuring a proxy within an applet, some of the FAQs may prove helpful.
- Client HTTP Programming Primer - The Primer describes how to submit an HTML form to a web server and retrieve the results. HTML forms are often used as login forms, so the Primer also tells you how to perform form-based login in your application.
- Building custom HTTP agents based on HttpCore - The tutorial provides a general introduction into the HttpCore API and explains in details how to build a custom HTTP agent based on HttpCore.
- Application Design FAQ - This FAQ addresses problems such as uploading files and configuring proxies based on JVM settings. It also explains the different ways in which a client may authenticate against a server.
- Connection Management FAQ - This FAQ addresses questions related to connection management, for example where sockets in state TIME_WAIT come from. Although the API is different, connection management in the new HttpClient works similar to that in the Commons HttpClient 3.1. The standard Java HttpUrlConnection also manages connections, though we're not really concerned about that.
- NTLM support - How to enable support for NTLM authentication in HttpClient.
API Specific Information
Commons HttpClient 3.1
- Tutorial - Explains how to use HttpClient 3.1 in simple scenarios. The concepts still apply to the new HttpClient 4.0, but the API has changed completely.
- Troubleshooting - Explains how to avoid common errors, and how to report the uncommon ones.
- User Guide - The HttpClient 3.1 User Guide is a selection of guides for specific topics such as Authentication, Multi-Threaded Applications, SSL, and others.