基本上,用户常用的就是HttpClient;它基于Http Core部分,但 Core部分太过于 low level,不建议使用,除非有特殊需要。


Apache HttpComponentsTM 项目,负责创建和维护一套专注于HTTP和相关协议的low level的Java components。

HttpComponents结构

HttpComponents Core

HttpCore 是一组low level HTTP传输组件,可被用于build custom client and server side HTTP services。HttpCore支持两种 I/O 模型:基于Java I/O的blocking模型、基于Java NIO的non-blocking & event driven I/O 模型。

blocking I/O模型,可能更适用于data intensive、low latency 场景;non-blocking模型可能更适用于high latency场景 -- 相对来说,这种场景下raw data throughput(吞吐量)的重要性 不如处理数以千计的并发HTTP连接的能力。

HttpComponents Client

HttpClient 是一个基于HttpCore的遵守HTTP/1.1的 HTTP agent实现。它还提供了可复用的components,可用于客户端认证、HTTP 状态管理,以及HTTP连接管理。HttpComponents Client是 Commons HttpClient 3.x 的继任者和替代者。

HttpComponents AsyncClient

Asynch HttpClient 是基于HttpCore NIO 和 HttpClient components的遵守HTTP/1.1协议的HTTP agent实现。它是Apache HttpClient的补充模块,用于特殊情况:处理大量并发连接的能力远比性能(指raw data吞吐量)更重要时的情况。

Apache HttpComponents 学习的更多相关文章

  1. Apache HttpComponents Client 4.0快速入门/升级-2.POST方法访问网页

    Apache HttpComponents Client 4.0已经发布多时,httpclient项目从commons子项目挪到了HttpComponents子项目下,httpclient3.1和 h ...

  2. org.apache.httpcomponents httpclient 发起HTTP JSON请求

    1. pom.xml <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactI ...

  3. JAVA中使用Apache HttpComponents Client的进行GET/POST请求使用案例

    一.简述需求 平时我们需要在JAVA中进行GET.POST.PUT.DELETE等请求时,使用第三方jar包会比较简单.常用的工具包有: 1.https://github.com/kevinsawic ...

  4. Apache HttpComponents中的cookie匹配策略

    Apache HttpComponents中的cookie匹配策略 */--> pre.src {background-color: #292b2e; color: #b2b2b2;} pre. ...

  5. Apache Flink学习笔记

    Apache Flink学习笔记 简介 大数据的计算引擎分为4代 第一代:Hadoop承载的MapReduce.它将计算分为两个阶段,分别为Map和Reduce.对于上层应用来说,就要想办法去拆分算法 ...

  6. Apache Shiro学习-2-Apache Shiro Web Support

     Apache Shiro Web Support  1. 配置 将 Shiro 整合到 Web 应用中的最简单方式是在 web.xml 的 Servlet ContextListener 和 Fil ...

  7. httpclient工具使用(org.apache.httpcomponents.httpclient)

    httpclient工具使用(org.apache.httpcomponents.httpclient) 引入依赖 <dependency> <groupId>org.apac ...

  8. commons-httpclient和org.apache.httpcomponents的区别

    <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpc ...

  9. Apache HttpComponents 工具类 [ HttpUtil ]

    pom.xml <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId&g ...

随机推荐

  1. C++第15周(春)项目2 - 用文件保存的学生名单

    课程首页在:http://blog.csdn.net/sxhelijian/article/details/11890759.内有完整教学方案及资源链接 本程序中须要的相关文件.请到http://pa ...

  2. hdu 1213 How Many Tables(并查集求无向图有几个连通分量)

    代码: #include<cstdio> #include<cstring> using namespace std; int n,m; int father[1005]; i ...

  3. 统一日志监控系统 springboot websocket 简单版 王代军-作品

    http://git.oschina.net/redArmy/springboot-websocket-logs 目的: 统一监控 开发测试环境日志 如果需要可以拓展线上环境的日志(自己视情况而定) ...

  4. MySQL查看SQL语句执行效率(转)

    Explain命令在解决数据库性能上是第一推荐使用命令,大部分的性能问题可以通过此命令来简单的解决,Explain可以用来查看 SQL 语句的执行效 果,可以帮助选择更好的索引和优化查询语句,写出更好 ...

  5. mac与windows上部署使用Redis

    windows下Redis安装 在Redis的官网下载页上有各种各样的版本,由于redis官网不支持windows,但是我们伟大的windows家族还是召唤了一群小伙伴开发了win版的redis.要在 ...

  6. unity5 Edit Collider

    按下Edit Collider按钮,视图中Collider线框中出现控制点,可以通过拖动控制点对Collider进行调整.

  7. [tools]python的mkdocs模块分分钟将md搞成一个网站

    docusaurus: facebook出的一个文档生成器,用起来感觉没那么友善 hugo: 这个很棒 python的mkdocs模块: 用起来最简单 python的这个模块可以分分钟将一坨md假设成 ...

  8. div设置contentEditable="true"作为文本编辑器,定位光标解决办法

    function set_focus(el) {    el = el[0]; // jquery 对象转dom对象    el.focus();    if ($.browser.msie) {   ...

  9. LeetCode: Letter Combinations of a Phone Number 解题报告

    Letter Combinations of a Phone Number Given a digit string, return all possible letter combinations ...

  10. LeetCode: Intersection of Two Linked Lists 解题报告

    Intersection of Two Linked Lists Write a program to find the node at which the intersection of two s ...