httpclient-tutorial
- 格式:pdf
- 大小:233.03 KB
- 文档页数:49
HttpClient TutorialOleg KalnichevskiJonathan MooreJilles van GurpiiPreface ................................................................................................................................... iv1. HttpClient scope ......................................................................................................... iv2. What HttpClient is NOT ............................................................................................. iv1. Fundamentals ....................................................................................................................... 11.1. Request execution ..................................................................................................... 11.1.1. HTTP request ................................................................................................. 11.1.2. HTTP response ............................................................................................... 21.1.3. Working with message headers ........................................................................ 21.1.4. HTTP entity ................................................................................................... 31.1.5. Ensuring release of low level resources ............................................................ 51.1.6. Consuming entity content ................................................................................ 61.1.7. Producing entity content .................................................................................. 61.1.8. Response handlers .......................................................................................... 71.2. HttpClient interface ................................................................................................... 81.2.1. HttpClient thread safety .................................................................................. 81.2.2. HttpClient resource deallocation ...................................................................... 91.3. HTTP execution context ............................................................................................ 91.4. Exception handling .................................................................................................. 101.4.1. HTTP transport safety ................................................................................... 101.4.2. Idempotent methods ...................................................................................... 111.4.3. Automatic exception recovery ........................................................................ 111.4.4. Request retry handler .................................................................................... 111.5. Aborting requests .................................................................................................... 121.6. HTTP protocol interceptors ...................................................................................... 121.7. Redirect handling .................................................................................................... 132. Connection management ..................................................................................................... 152.1. Connection persistence ............................................................................................. 152.2. HTTP connection routing ......................................................................................... 152.2.1. Route computation ........................................................................................ 152.2.2. Secure HTTP connections ............................................................................. 152.3. HTTP connection managers ..................................................................................... 162.3.1. Managed connections and connection managers .............................................. 162.3.2. Simple connection manager ........................................................................... 162.3.3. Pooling connection manager .......................................................................... 172.3.4. Connection manager shutdown ...................................................................... 172.4. Multithreaded request execution ............................................................................... 172.5. Connection eviction policy ....................................................................................... 192.6. Connection keep alive strategy ................................................................................. 202.7. Connection socket factories ...................................................................................... 202.7.1. Secure socket layering ................................................................................... 212.7.2. Integration with connection manager .............................................................. 212.7.3. SSL/TLS customization ................................................................................. 212.7.4. Hostname verification ................................................................................... 212.8. HttpClient proxy configuration ................................................................................. 223. HTTP state management ..................................................................................................... 243.1. HTTP cookies ......................................................................................................... 243.1.1. Cookie versions ............................................................................................ 243.2. Cookie specifications ............................................................................................... 253.3. Choosing cookie policy ............................................................................................ 26