| 程序包 | 说明 |
|---|---|
| org.ladsn.tool.http |
Hutool-http针对JDK的HttpUrlConnection做一层封装,简化了HTTPS请求、文件上传、Cookie记忆等操作,使Http请求变得无比简单。
|
| 限定符和类型 | 方法和说明 |
|---|---|
Method |
HttpRequest.getMethod()
获取Http请求方法
|
Method |
HttpConnection.getMethod()
获取请求方法,GET/POST
|
static Method |
Method.valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static Method[] |
Method.values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
| 限定符和类型 | 方法和说明 |
|---|---|
static HttpConnection |
HttpConnection.create(java.lang.String urlStr,
Method method)
创建HttpConnection
|
static HttpConnection |
HttpConnection.create(java.lang.String urlStr,
Method method,
javax.net.ssl.HostnameVerifier hostnameVerifier,
javax.net.ssl.SSLSocketFactory ssf)
创建HttpConnection
|
static HttpConnection |
HttpConnection.create(java.lang.String urlStr,
Method method,
javax.net.ssl.HostnameVerifier hostnameVerifier,
javax.net.ssl.SSLSocketFactory ssf,
int timeout,
java.net.Proxy proxy)
创建HttpConnection
|
static HttpConnection |
HttpConnection.create(java.lang.String urlStr,
Method method,
int timeout)
创建HttpConnection
|
static HttpConnection |
HttpConnection.create(java.net.URL url,
Method method,
javax.net.ssl.HostnameVerifier hostnameVerifier,
javax.net.ssl.SSLSocketFactory ssf,
int timeout,
java.net.Proxy proxy)
创建HttpConnection
|
static HttpRequest |
HttpUtil.createRequest(Method method,
java.lang.String url)
创建Http请求对象
|
HttpRequest |
HttpRequest.method(Method method)
设置请求方法
|
HttpRequest |
HttpRequest.setMethod(Method method)
设置请求方法
|
HttpConnection |
HttpConnection.setMethod(Method method)
设置请求方法
|
| 构造器和说明 |
|---|
HttpConnection(java.lang.String urlStr,
Method method)
构造HttpConnection
|
HttpConnection(java.lang.String urlStr,
Method method,
javax.net.ssl.HostnameVerifier hostnameVerifier,
javax.net.ssl.SSLSocketFactory ssf,
int timeout,
java.net.Proxy proxy)
构造HttpConnection
|
HttpConnection(java.lang.String urlStr,
Method method,
int timeout)
构造HttpConnection
|
HttpConnection(java.net.URL url,
Method method,
javax.net.ssl.HostnameVerifier hostnameVerifier,
javax.net.ssl.SSLSocketFactory ssf,
int timeout,
java.net.Proxy proxy)
构造HttpConnection
|
Copyright © 2018. All rights reserved.