| 程序包 | 说明 |
|---|---|
| cn.hutool.http |
Hutool-http针对JDK的HttpUrlConnection做一层封装,简化了HTTPS请求、文件上传、Cookie记忆等操作,使Http请求变得无比简单。
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
HttpResponse.body()
获取响应主体
|
HttpConnection |
HttpConnection.setHttpsInfo(HostnameVerifier hostnameVerifier,
SSLSocketFactory ssf)
设置https请求参数
有些时候htts请求会出现com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl的实现,此为sun内部api,按照普通http请求处理 |
Copyright © 2022. All rights reserved.