Package | Description |
---|---|
org.dromara.hutool.http |
Hutool-http针对JDK的HttpUrlConnection做一层封装,简化了HTTPS请求、文件上传、Cookie记忆等操作,使Http请求变得无比简单。
|
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.meta |
Http元数据信息,包括Header枚举、状态码、Http方法、枚举Content-Type等
|
Modifier and Type | Method and Description |
---|---|
static Request |
HttpUtil.createRequest(String url,
Method method)
创建Http请求对象
|
Modifier and Type | Method and Description |
---|---|
Method |
Request.method()
获取Http请求方法
|
Modifier and Type | Method and Description |
---|---|
Request |
Request.method(Method method)
设置请求方法
|
Modifier and Type | Method and Description |
---|---|
Method |
JdkHttpConnection.getMethod()
获取请求方法,GET/POST
|
Modifier and Type | Method and Description |
---|---|
JdkHttpConnection |
JdkHttpConnection.setMethod(Method method)
设置请求方法
|
Modifier and Type | Method and Description |
---|---|
static Method |
Method.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Method[] |
Method.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Copyright © 2025. All rights reserved.