Package | Description |
---|---|
cn.hutool.http |
Hutool-http针对JDK的HttpUrlConnection做一层封装,简化了HTTPS请求、文件上传、Cookie记忆等操作,使Http请求变得无比简单。
|
Modifier and Type | Method and Description |
---|---|
static ContentType |
ContentType.get(String body)
从请求参数的body中判断请求的Content-Type类型,支持的类型有:
1. application/json
1. application/xml
|
static ContentType |
ContentType.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ContentType[] |
ContentType.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static String |
ContentType.build(ContentType contentType,
Charset charset)
输出Content-Type字符串,附带编码信息
|
Copyright © 2024. All rights reserved.