| 程序包 | 说明 |
|---|---|
| org.dromara.hutool.http.meta |
Http元数据信息,包括Header枚举、状态码、Http方法、枚举Content-Type等
|
| 限定符和类型 | 方法和说明 |
|---|---|
static ContentType |
ContentType.get(String body)
从请求参数的body中判断请求的Content-Type类型,支持的类型有:
1. application/json
1. application/xml
|
static ContentType |
ContentType.valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static ContentType[] |
ContentType.values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
ContentType.build(ContentType contentType,
Charset charset)
输出Content-Type字符串,附带编码信息
|
Copyright © 2023. All rights reserved.