httpclient新舊版本分割點4.3

來源:互聯網
上載者:User

標籤:java   mini   context   host   default   ges   included   objects   crawler   

從這個版本開始,httpclient的api發生了一次重大調整。主要包括如下:
Release 4.3 Final-------------------This is the first stable (GA) release of HttpClient 4.3. The most notable enhancements includedin this release are:* Support for Java 7 try-with-resources for resource management (connection release.)* Added fluent Builder classes for HttpEntity, HttpRequest, HttpClient and SSLContext instances.* Deprecation of preference and configuration API based on HttpParams interface in favor ofconstructor injection and plain configuration objects.* Reliance on object immutability instead of access synchronization for thread safety.Several old classes whose instances can be shared by multiple request exchanges havebeen replaced by immutable equivalents.* DefaultHttpClient, DecompressingHttpClient, CachingHttpClient and similar classes aredeprecated in favor of builder classes that produce immutable HttpClient instances.* HttpClient builders now dynamically construct a request execution pipeline tailoredspecifically to the user configuration by physically excluding unnecessary protocol components.* There is now an option to construct a minimal HttpClient implementation that can only executebasic HTTP message exchanges without redirects, authentication, state management or proxy support.This feature might be of particular use in web crawler development.* There is now option to avoid strict URI syntax for request URIs by executing HTTP requestswith an explicitly specified target host. HttpClient will no longer attempt to parse the requestURI if it does not need to extract the target host from it.

httpclient新舊版本分割點4.3

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.