| 程序包 | 说明 |
|---|---|
| cn.hutool.http |
Hutool-http针对JDK的HttpUrlConnection做一层封装,简化了HTTPS请求、文件上传、Cookie记忆等操作,使Http请求变得无比简单。
|
| 限定符和类型 | 方法和说明 |
|---|---|
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()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
Copyright © 2021. All rights reserved.