基本上,用户常用的就是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. 基于配置的Spring MVC3

    网上查找的spring mvc3大部分都是基于注射的方式,总感觉注射有点怪怪.不利于后期扩展和项目管理,于是特意写下这篇基于xml配置的Spring MVC3.以供大家參考. 怎么建立web项目和下载 ...

  2. jquery 事件注冊 与反复事件处理

    <!doctype html> <html lang="us"> <head> <meta charset="utf-8&quo ...

  3. Ibatis基础知识:#与$的差别

    背景 Ibatis是一个轻量级.非侵入式的持久层框架,适用于范围较广.较轻便--当然,不管J2EE中哪一个持久层框架,都会基于JDBC(不细究JNDI方式).我们在SqlMap中编写SQL,利用各种S ...

  4. oracle Database link 创建

    http://www.cnblogs.com/yhason/p/3735319.html

  5. Hive查看table在HDFS上的存储路径

    hive>show databases;hive>use databasename;hive>show create table tablename; --查看table的存储路径h ...

  6. C#匿名对象的使用

    单个对象 new { Inv = item.Inv, Count = item.Count } 数组 var testData = new[] { }, }, }, }, }, }, }, }, } ...

  7. 使用base64:url 来定义背景图片url

    普通的背景图片css是这样的: background-image:url(http://www.zhangxinxu.com/wordpress/wp-content/themes/default/i ...

  8. Spark的基本说明

    1.关于Application 用户程序,一个Application由一个在Driver运行的功能代码和多个Executor上运行的代码组成(工作在不同的节点上). 又分成多个Job,每个Job由多个 ...

  9. Ribbon对于SocketTimeOutException重试的坑以及重试代码解析

    背景 本文基于Spring-Cloud, Daltson SR4 微服务一般多实例部署,在发布的时候,我们要做到无感知发布:微服务调用总会通过Ribbon,同时里面会实现一些重试的机制,相关配置是: ...

  10. VC++ 获取本地IP和计算机名

    主要是两个函数的使用,gethostname();.gethostbyname(); 自定义两个函数GetLocalHostName获取计算机名.GetIPAddress获取IP地址 int CIPD ...