| 程序包 | 说明 |
|---|---|
| org.dromara.hutool.http.client.engine |
Http客户端引擎实现
|
| org.dromara.hutool.http.client.engine.httpclient4 |
Apache HttpClient 4.x实现
文档见:https://hc.apache.org/httpcomponents-client-4.5.x/index.html |
| org.dromara.hutool.http.client.engine.httpclient5 |
Apache HttpClient 5.1.x实现
文档见:https://hc.apache.org/httpcomponents-client-5.1.x/index.html |
| org.dromara.hutool.http.client.engine.jdk |
基于JDK的HttpUrlConnection封装的HTTP客户端
|
| org.dromara.hutool.http.client.engine.okhttp |
OKHttp3封装
文档见:https://square.github.io/okhttp/ |
| 限定符和类型 | 方法和说明 |
|---|---|
static ClientEngine |
ClientEngineFactory.createEngine()
根据用户引入的HTTP客户端引擎jar,自动创建对应的拼音引擎对象
推荐创建的引擎单例使用,此方法每次调用会返回新的引擎 |
static ClientEngine |
ClientEngineFactory.createEngine(ClientConfig config)
根据用户引入的HTTP客户端引擎jar,自动创建对应的拼音引擎对象
推荐创建的引擎单例使用,此方法每次调用会返回新的引擎 |
static ClientEngine |
ClientEngineFactory.getEngine()
获得单例的ClientEngine
|
ClientEngine |
ClientEngine.init(ClientConfig config)
设置客户端引擎参数,如超时、代理等信息
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
HttpClient4Engine
Apache HttpClient5的HTTP请求引擎
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
HttpClient5Engine
Apache HttpClient5的HTTP请求引擎
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
JdkClientEngine
基于JDK的UrlConnection的Http客户端引擎实现
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
OkHttpEngine
OkHttp3客户端引擎封装
|
Copyright © 2023. All rights reserved.