类 HttpUtils
java.lang.Object
cn.herodotus.stirrup.web.core.definition.utils.HttpUtils
- 直接已知子类:
CookieUtils,CookieUtils
Description: Http 通用工具类
- 作者:
- : gengwei.zheng
- Date:
- : 2024/2/5 21:50
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static String获取 Cookie 请求头中的属性值获取多个 Cookie 请求头中的属性值static String从 Cookie 请求头中,找到给定任意给定属性的值static booleanisGetRequest(org.springframework.http.HttpMethod method) 判断是否为 GET 请求static BooleanisPostRequest(org.springframework.http.HttpMethod method, String contentType) 判断是否为 POST 类型 请求
-
构造器详细资料
-
HttpUtils
public HttpUtils()
-
-
方法详细资料
-
get
获取多个 Cookie 请求头中的属性值- 参数:
cookie- Cookie 请求头值name- Cookie中的属性名- 返回:
- cookie 中属性值的集合
-
getAny
从 Cookie 请求头中,找到给定任意给定属性的值- 参数:
cookie- Cookie 请求头值name- Cookie中的属性名- 返回:
- cookie 中属性值的集合
-
get
获取 Cookie 请求头中的属性值- 参数:
cookie- Cookie 请求头值name- Cookie中的属性名- 返回:
- cookie 中属性值
-
isGetRequest
public static boolean isGetRequest(org.springframework.http.HttpMethod method) 判断是否为 GET 请求- 参数:
method-HttpMethod- 返回:
- true 是 GET 请求,false 不是 GET 请求
-
isPostRequest
判断是否为 POST 类型 请求- 参数:
method-HttpMethodcontentType- 内容类型- 返回:
- true 是 POST 请求,false 不是 POST 请求
-