本文更新日期:2019年10月13日

httpclient隶属于apache的httpcomponents项目,其包括两部分:httpclient和httpcore,每部分都有自己的分支和版本号。

HttpCore是对HTTP协议的基础封装的一套组件。可以用HttpCore来建立客户端、代理、服务端Http服务;支持同步异步服务;一系列基于阻塞和非阻塞IO模型等。

使用httpclient需要的maven依赖


<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpclient</artifactId>
    <version>4.5.10</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
<dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    <version>4.4.12</version>
</dependency>

参考:

https://www.cnblogs.com/subendong/p/9558542.html