| Package | Description |
|---|---|
| org.dromara.hutool.http.client |
HTTP请求客户端封装,请求过程如下:
Server
^ |
| v
Request Response
^ |
| v
ClientEngine
|
| org.dromara.hutool.http.client.engine.jdk |
基于JDK的HttpUrlConnection封装的HTTP客户端
|
| org.dromara.hutool.http.ssl |
SSL封装
|
| Modifier and Type | Method and Description |
|---|---|
SSLInfo |
ClientConfig.getSslInfo()
获取SSLInfo
|
| Modifier and Type | Method and Description |
|---|---|
ClientConfig |
ClientConfig.setSSLInfo(SSLInfo sslInfo)
|
| Modifier and Type | Method and Description |
|---|---|
JdkHttpConnection |
JdkHttpConnection.setSSLInfo(SSLInfo sslInfo)
设置https中SSL相关请求参数
有些时候htts请求会出现com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl的实现,此为sun内部api,按照普通http请求处理 |
| Modifier and Type | Field and Description |
|---|---|
static SSLInfo |
SSLInfo.DEFAULT
默认
SSLInfo,全部为null,使用客户端引擎默认配置 |
static SSLInfo |
SSLInfo.TRUST_ANY
信任所有的
SSLInfo |
| Modifier and Type | Method and Description |
|---|---|
static SSLInfo |
SSLInfo.of()
构建
SSLInfo |
SSLInfo |
SSLInfo.setHostnameVerifier(HostnameVerifier hostnameVerifier)
设置
HostnameVerifier,信任所有则使用TrustAnyHostnameVerifier |
SSLInfo |
SSLInfo.setProtocols(String... protocols)
设置协议列表
|
SSLInfo |
SSLInfo.setSslContext(SSLContext sslContext)
设置
SSLContext,可以使用SSLContextBuilder构建 |
SSLInfo |
SSLInfo.setTrustManager(X509TrustManager trustManager)
设置
X509TrustManager,新人所有则使用TrustAnyTrustManager |
Copyright © 2024. All rights reserved.