Subversion Repositories javautils

Rev

Blame | Last modification | View Log | RSS feed

  1. <html><head>
  2.       <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  3.    <title>HttpClient Tutorial</title><link rel="stylesheet" href="css/hc-tutorial.css" type="text/css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.73.2"><link rel="start" href="index.html" title="HttpClient Tutorial"><link rel="next" href="preface.html" title="Preface"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:fo="http://www.w3.org/1999/XSL/Format" class="banner"><a class="bannerLeft" href="http://www.apache.org/" title="Apache Software Foundation"><img style="border:none;" src="images/asf_logo_wide.gif"></a><a class="bannerRight" href="http://hc.apache.org/httpcomponents-core/" title="Apache HttpComponents Core"><img style="border:none;" src="images/hc_logo.png"></a><div class="clear"></div></div><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">HttpClient Tutorial</th></tr><tr><td width="20%" align="left">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="preface.html">Next</a></td></tr></table><hr></div><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="d4e1"></a>HttpClient Tutorial</h1></div><div><div class="authorgroup">
  4.             <div class="author"><h3 class="author"><span class="firstname">Oleg</span> <span class="surname">Kalnichevski</span></h3></div>
  5.         </div></div><div><p class="releaseinfo">4.0.1</p></div><div><div class="legalnotice"><a name="d4e9"></a>
  6.             <p>
  7.             Licensed to the Apache Software Foundation (ASF) under one
  8.             or more contributor license agreements.  See the NOTICE file
  9.             distributed with this work for additional information
  10.             regarding copyright ownership.  The ASF licenses this file
  11.             to you under the Apache License, Version 2.0 (the
  12.             "License"); you may not use this file except in compliance
  13.             with the License.  You may obtain a copy of the License at
  14.             </p>
  15.             <p>
  16.               <a class="ulink" href="http://www.apache.org/licenses/LICENSE-2.0" target="_top">http://www.apache.org/licenses/LICENSE-2.0</a>
  17.             </p>
  18.             <p>
  19.             Unless required by applicable law or agreed to in writing,
  20.             software distributed under the License is distributed on an
  21.             "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  22.             KIND, either express or implied.  See the License for the
  23.             specific language governing permissions and limitations
  24.             under the License.
  25.             </p>
  26.         </div></div></div><hr></div><div class="toc"><dl><dt><span class="preface"><a href="preface.html">Preface</a></span></dt><dd><dl><dt><span class="section"><a href="preface.html#d4e20">1. HttpClient scope</a></span></dt><dt><span class="section"><a href="preface.html#d4e30">2. What HttpClient is NOT</a></span></dt></dl></dd><dt><span class="chapter"><a href="fundamentals.html">1. Fundamentals</a></span></dt><dd><dl><dt><span class="section"><a href="fundamentals.html#d4e37">1.1. Request execution</a></span></dt><dd><dl><dt><span class="section"><a href="fundamentals.html#d4e43">1.1.1. HTTP request</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e72">1.1.2. HTTP response</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e78">1.1.3. Working with message headers</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e93">1.1.4. HTTP entity</a></span></dt><dd><dl><dt><span class="section"><a href="fundamentals.html#d4e117">1.1.4.1. Repeatable entities</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e122">1.1.4.2. Using HTTP entities</a></span></dt></dl></dd><dt><span class="section"><a href="fundamentals.html#d4e143">1.1.5. Ensuring release of low level resources</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e152">1.1.6. Consuming entity content</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e164">1.1.7. Producing entity content</a></span></dt><dd><dl><dt><span class="section"><a href="fundamentals.html#d4e179">1.1.7.1. Dynamic content entities</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e186">1.1.7.2. HTML forms</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e194">1.1.7.3. Content chunking</a></span></dt></dl></dd><dt><span class="section"><a href="fundamentals.html#d4e199">1.1.8. Response handlers</a></span></dt></dl></dd><dt><span class="section"><a href="fundamentals.html#d4e205">1.2. HTTP execution context</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e246">1.3. Exception handling</a></span></dt><dd><dl><dt><span class="section"><a href="fundamentals.html#d4e251">1.3.1. HTTP transport safety</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e255">1.3.2. Idempotent methods</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e267">1.3.3. Automatic exception recovery</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e280">1.3.4. Request retry handler</a></span></dt></dl></dd><dt><span class="section"><a href="fundamentals.html#d4e285">1.4. Aborting requests</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e290">1.5. HTTP protocol interceptors</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e298">1.6. HTTP parameters</a></span></dt><dd><dl><dt><span class="section"><a href="fundamentals.html#d4e316">1.6.1. Parameter hierarchies</a></span></dt><dt><span class="section"><a href="fundamentals.html#d4e327">1.6.2. HTTP parameters beans</a></span></dt></dl></dd><dt><span class="section"><a href="fundamentals.html#d4e337">1.7. HTTP request execution parameters</a></span></dt></dl></dd><dt><span class="chapter"><a href="connmgmt.html">2. Connection management</a></span></dt><dd><dl><dt><span class="section"><a href="connmgmt.html#d4e391">2.1. Connection parameters</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e438">2.2. Connection persistence</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e442">2.3. HTTP connection routing</a></span></dt><dd><dl><dt><span class="section"><a href="connmgmt.html#d4e446">2.3.1. Route computation</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e462">2.3.2. Secure HTTP connections</a></span></dt></dl></dd><dt><span class="section"><a href="connmgmt.html#d4e465">2.4. HTTP route parameters</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e484">2.5. Socket factories</a></span></dt><dd><dl><dt><span class="section"><a href="connmgmt.html#d4e492">2.5.1. Secure socket layering</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e497">2.5.2. SSL/TLS customization</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e506">2.5.3. Hostname verification</a></span></dt></dl></dd><dt><span class="section"><a href="connmgmt.html#d4e532">2.6. Protocol schemes</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e540">2.7. HttpClient proxy configuration</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e550">2.8. HTTP connection managers</a></span></dt><dd><dl><dt><span class="section"><a href="connmgmt.html#d4e552">2.8.1. Connection operators</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e563">2.8.2. Managed connections and connection managers</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e588">2.8.3. Simple connection manager</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e596">2.8.4. Pooling connection manager</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e604">2.8.5. Connection manager shutdown</a></span></dt></dl></dd><dt><span class="section"><a href="connmgmt.html#d4e608">2.9. Connection management parameters</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e629">2.10. Multithreaded request execution</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e638">2.11. Connection eviction policy</a></span></dt><dt><span class="section"><a href="connmgmt.html#d4e645">2.12. Connection keep alive strategy</a></span></dt></dl></dd><dt><span class="chapter"><a href="statemgmt.html">3. HTTP state management</a></span></dt><dd><dl><dt><span class="section"><a href="statemgmt.html#d4e655">3.1. HTTP cookies</a></span></dt><dd><dl><dt><span class="section"><a href="statemgmt.html#d4e672">3.1.1. Cookie versions</a></span></dt></dl></dd><dt><span class="section"><a href="statemgmt.html#d4e682">3.2. Cookie specifications</a></span></dt><dt><span class="section"><a href="statemgmt.html#d4e721">3.3. HTTP cookie and state management parameters</a></span></dt><dt><span class="section"><a href="statemgmt.html#d4e749">3.4. Cookie specification registry</a></span></dt><dt><span class="section"><a href="statemgmt.html#d4e774">3.5. Choosing cookie policy</a></span></dt><dt><span class="section"><a href="statemgmt.html#d4e778">3.6. Custom cookie policy</a></span></dt><dt><span class="section"><a href="statemgmt.html#d4e784">3.7. Cookie persistence</a></span></dt><dt><span class="section"><a href="statemgmt.html#d4e793">3.8. HTTP state management and execution context</a></span></dt><dt><span class="section"><a href="statemgmt.html#d4e820">3.9. Per user / thread state management</a></span></dt></dl></dd><dt><span class="chapter"><a href="authentication.html">4. HTTP authentication</a></span></dt><dd><dl><dt><span class="section"><a href="authentication.html#d4e829">4.1. User credentials</a></span></dt><dt><span class="section"><a href="authentication.html#d4e841">4.2. Authentication schemes</a></span></dt><dt><span class="section"><a href="authentication.html#d4e869">4.3. HTTP authentication parameters</a></span></dt><dt><span class="section"><a href="authentication.html#d4e884">4.4. Authentication scheme registry</a></span></dt><dt><span class="section"><a href="authentication.html#d4e903">4.5. Credentials provider</a></span></dt><dt><span class="section"><a href="authentication.html#d4e914">4.6. HTTP authentication and execution context</a></span></dt><dt><span class="section"><a href="authentication.html#d4e950">4.7. Preemptive authentication</a></span></dt><dt><span class="section"><a href="authentication.html#ntlm">4.8. NTLM Authentication</a></span></dt><dd><dl><dt><span class="section"><a href="authentication.html#d4e963">4.8.1. NTLM connection persistence</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="httpagent.html">5. HTTP client service</a></span></dt><dd><dl><dt><span class="section"><a href="httpagent.html#d4e984">5.1. HttpClient facade</a></span></dt><dt><span class="section"><a href="httpagent.html#d4e1001">5.2. HttpClient parameters</a></span></dt><dt><span class="section"><a href="httpagent.html#d4e1049">5.3. Automcatic redirect handling</a></span></dt><dt><span class="section"><a href="httpagent.html#d4e1056">5.4. HTTP client and execution context</a></span></dt></dl></dd><dt><span class="chapter"><a href="advanced.html">6. Advanced topics</a></span></dt><dd><dl><dt><span class="section"><a href="advanced.html#d4e1063">6.1. Custom client connections</a></span></dt><dt><span class="section"><a href="advanced.html#stateful_conn">6.2. Stateful HTTP connections</a></span></dt><dd><dl><dt><span class="section"><a href="advanced.html#d4e1089">6.2.1. User token handler</a></span></dt><dt><span class="section"><a href="advanced.html#d4e1099">6.2.2. User token and execution context</a></span></dt><dd><dl><dt><span class="section"><a href="advanced.html#d4e1110">6.2.2.1. Persistent stateful connections</a></span></dt></dl></dd></dl></dd></dl></dd></dl></div>
  27.    
  28.    
  29.  
  30.    
  31.  
  32.    
  33.    
  34.    
  35.    
  36.    
  37.    
  38.    
  39.    
  40. </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="preface.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right" valign="top">&nbsp;Preface</td></tr></table></div></body></html>