annotate libs/httpcomponents-client-4.0-beta1/javadoc/httpclient/org/apache/http/client/package-summary.html @ 5:0be9d53a6967

editor for annotations
author dwinter
date Tue, 13 Dec 2011 17:43:46 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
2 <!--NewPage-->
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
3 <HTML>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
4 <HEAD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
5 <!-- Generated by javadoc (build 1.5.0_11) on Sat Aug 23 11:49:52 GMT+01:00 2008 -->
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
6 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
7 <TITLE>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
8 org.apache.http.client (HttpClient 4.0-beta1 API)
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
9 </TITLE>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
10
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
11 <META NAME="keywords" CONTENT="org.apache.http.client package">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
12
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
13 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
14
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
15 <SCRIPT type="text/javascript">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
16 function windowTitle()
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
17 {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
18 parent.document.title="org.apache.http.client (HttpClient 4.0-beta1 API)";
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
19 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
20 </SCRIPT>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
21 <NOSCRIPT>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
22 </NOSCRIPT>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
23
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
24 </HEAD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
25
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
26 <BODY BGCOLOR="white" onload="windowTitle();">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
27
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
28
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
29 <!-- ========= START OF TOP NAVBAR ======= -->
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
30 <A NAME="navbar_top"><!-- --></A>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
31 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
32 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
33 <TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
34 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
35 <A NAME="navbar_top_firstrow"><!-- --></A>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
36 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
37 <TR ALIGN="center" VALIGN="top">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
39 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
46 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
47 </TABLE>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
48 </TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
49 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
50 </EM>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
51 </TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
52 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
53
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
54 <TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
55 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
56 &nbsp;<A HREF="../../../../org/apache/http/auth/params/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
57 &nbsp;<A HREF="../../../../org/apache/http/client/entity/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
58 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
59 <A HREF="../../../../index.html?org/apache/http/client/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
60 &nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
61 &nbsp;<SCRIPT type="text/javascript">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
62 <!--
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
63 if(window==top) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
64 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
65 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
66 //-->
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
67 </SCRIPT>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
68 <NOSCRIPT>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
69 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
70 </NOSCRIPT>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
71
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
72
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
73 </FONT></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
74 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
75 </TABLE>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
76 <A NAME="skip-navbar_top"></A>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
77 <!-- ========= END OF TOP NAVBAR ========= -->
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
78
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
79 <HR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
80 <H2>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
81 Package org.apache.http.client
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
82 </H2>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
83 The API for client-side HTTP communication and
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
84 entry point to the <i>HttpClient</i> module.
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
85 <P>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
86 <B>See:</B>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
87 <BR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
88 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
89 <P>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
90
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
91 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
92 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
93 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
94 <B>Interface Summary</B></FONT></TH>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
95 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
96 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
97 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/AuthenticationHandler.html" title="interface in org.apache.http.client">AuthenticationHandler</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
98 <TD>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
99 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
100 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
101 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/CookieStore.html" title="interface in org.apache.http.client">CookieStore</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
102 <TD>Abstract cookie store.</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
103 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
104 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
105 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/CredentialsProvider.html" title="interface in org.apache.http.client">CredentialsProvider</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
106 <TD>Abstract credentials provider.</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
107 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
108 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
109 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/HttpClient.html" title="interface in org.apache.http.client">HttpClient</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
110 <TD>Interface for an HTTP client.</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
111 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
112 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
113 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/HttpRequestRetryHandler.html" title="interface in org.apache.http.client">HttpRequestRetryHandler</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
114 <TD>A handler for determining if an HttpRequest should be retried after a
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
115 recoverable exception during execution.</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
116 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
117 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
118 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/RedirectHandler.html" title="interface in org.apache.http.client">RedirectHandler</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
119 <TD>A handler for determining if an HTTP request should be redirected to
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
120 a new location in response to an HTTP response received from the target
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
121 server.</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
122 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
123 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
124 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/RequestDirector.html" title="interface in org.apache.http.client">RequestDirector</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
125 <TD>A client-side request director.</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
126 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
127 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
128 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/ResponseHandler.html" title="interface in org.apache.http.client">ResponseHandler&lt;T&gt;</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
129 <TD>Handler that encapsulates the process of generating a response object
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
130 from a <CODE>HttpResponse</CODE>.</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
131 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
132 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
133 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/UserTokenHandler.html" title="interface in org.apache.http.client">UserTokenHandler</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
134 <TD>A handler for determining if the given execution context is user specific
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
135 or not.</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
136 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
137 </TABLE>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
138 &nbsp;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
139
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
140 <P>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
141
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
142 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
143 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
144 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
145 <B>Exception Summary</B></FONT></TH>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
146 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
147 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
148 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/CircularRedirectException.html" title="class in org.apache.http.client">CircularRedirectException</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
149 <TD>Signals a circular redirect</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
150 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
151 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
152 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/ClientProtocolException.html" title="class in org.apache.http.client">ClientProtocolException</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
153 <TD>Signals an error in the HTTP protocol.</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
154 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
155 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
156 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/HttpResponseException.html" title="class in org.apache.http.client">HttpResponseException</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
157 <TD>Signals a non 2xx HTTP response.</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
158 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
159 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
160 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/NonRepeatableRequestException.html" title="class in org.apache.http.client">NonRepeatableRequestException</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
161 <TD>Signals failure to retry the request due to non-repeatable request
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
162 entity.</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
163 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
164 <TR BGCOLOR="white" CLASS="TableRowColor">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
165 <TD WIDTH="15%"><B><A HREF="../../../../org/apache/http/client/RedirectException.html" title="class in org.apache.http.client">RedirectException</A></B></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
166 <TD>Signals violation of HTTP specification caused by an invalid redirect</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
167 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
168 </TABLE>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
169 &nbsp;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
170
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
171 <P>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
172 <A NAME="package_description"><!-- --></A><H2>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
173 Package org.apache.http.client Description
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
174 </H2>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
175
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
176 <P>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
177 The API for client-side HTTP communication and
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
178 entry point to the <i>HttpClient</i> module.
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
179 <p/>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
180 The usual execution flow can be demonstrated by the
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
181 code snippet below:
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
182
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
183 <PRE>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
184 HttpClient httpclient = new DefaultHttpClient();
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
185
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
186 // Prepare a request object
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
187 HttpGet httpget = new HttpGet("http://www.apache.org/");
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
188
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
189 // Execute the request
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
190 HttpResponse response = httpclient.execute(httpget);
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
191
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
192 // Examine the response status
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
193 System.out.println(response.getStatusLine());
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
194
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
195 // Get hold of the response entity
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
196 HttpEntity entity = response.getEntity();
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
197
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
198 // If the response does not enclose an entity, there is no need
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
199 // to worry about connection release
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
200 if (entity != null) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
201 InputStream instream = entity.getContent();
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
202 try {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
203
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
204 BufferedReader reader = new BufferedReader(
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
205 new InputStreamReader(instream));
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
206 // do something useful with the response
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
207 System.out.println(reader.readLine());
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
208
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
209 } catch (IOException ex) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
210
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
211 // In case of an IOException the connection will be released
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
212 // back to the connection manager automatically
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
213 throw ex;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
214
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
215 } catch (RuntimeException ex) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
216
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
217 // In case of an unexpected exception you may want to abort
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
218 // the HTTP request in order to shut down the underlying
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
219 // connection and release it back to the connection manager.
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
220 httpget.abort();
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
221 throw ex;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
222
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
223 } finally {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
224
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
225 // Closing the input stream will trigger connection release
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
226 instream.close();
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
227
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
228 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
229 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
230
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
231 </PRE>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
232 <P>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
233
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
234 <P>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
235 <DL>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
236 </DL>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
237 <HR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
238
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
239
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
240 <!-- ======= START OF BOTTOM NAVBAR ====== -->
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
241 <A NAME="navbar_bottom"><!-- --></A>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
242 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
243 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
244 <TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
245 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
246 <A NAME="navbar_bottom_firstrow"><!-- --></A>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
247 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
248 <TR ALIGN="center" VALIGN="top">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
249 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
250 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
251 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
252 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
253 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
254 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
255 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
256 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
257 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
258 </TABLE>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
259 </TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
260 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
261 </EM>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
262 </TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
263 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
264
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
265 <TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
266 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
267 &nbsp;<A HREF="../../../../org/apache/http/auth/params/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
268 &nbsp;<A HREF="../../../../org/apache/http/client/entity/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
269 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
270 <A HREF="../../../../index.html?org/apache/http/client/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
271 &nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
272 &nbsp;<SCRIPT type="text/javascript">
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
273 <!--
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
274 if(window==top) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
275 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
276 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
277 //-->
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
278 </SCRIPT>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
279 <NOSCRIPT>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
280 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
281 </NOSCRIPT>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
282
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
283
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
284 </FONT></TD>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
285 </TR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
286 </TABLE>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
287 <A NAME="skip-navbar_bottom"></A>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
288 <!-- ======== END OF BOTTOM NAVBAR ======= -->
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
289
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
290 <HR>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
291 Copyright © 1999-2008 <a href="http://www.apache.org/">Apache Software Foundation</a>. All Rights Reserved.
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
292 </BODY>
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
293 </HTML>