Package | Description |
---|---|
cn.hutool.http |
Hutool-http针对JDK的HttpUrlConnection做一层封装,简化了HTTPS请求、文件上传、Cookie记忆等操作,使Http请求变得无比简单。
|
Modifier and Type | Method and Description |
---|---|
GlobalHeaders |
GlobalHeaders.clearHeaders()
清除所有头信息,包括全局头信息
|
GlobalHeaders |
GlobalHeaders.header(Header name,
String value)
设置一个header
覆盖模式,则替换之前的值 |
GlobalHeaders |
GlobalHeaders.header(Header name,
String value,
boolean isOverride)
设置一个header
如果覆盖模式,则替换之前的值,否则加入到值列表中 |
GlobalHeaders |
GlobalHeaders.header(Map<String,List<String>> headers)
设置请求头
不覆盖原有请求头 |
GlobalHeaders |
GlobalHeaders.header(String name,
String value)
设置一个header
覆盖模式,则替换之前的值 |
GlobalHeaders |
GlobalHeaders.header(String name,
String value,
boolean isOverride)
设置一个header
如果覆盖模式,则替换之前的值,否则加入到值列表中 |
GlobalHeaders |
GlobalHeaders.putDefault(boolean isReset)
加入默认的头部信息
|
GlobalHeaders |
GlobalHeaders.removeHeader(Header name)
移除一个头信息
|
GlobalHeaders |
GlobalHeaders.removeHeader(String name)
移除一个头信息
|
static GlobalHeaders |
GlobalHeaders.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GlobalHeaders[] |
GlobalHeaders.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Copyright © 2024. All rights reserved.