类 RequestUtils
java.lang.Object
com.publiccms.common.tools.RequestUtils
Request工具类
RequestUtils
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static jakarta.servlet.http.CookieaddCookie(String contextPath, String schema, jakarta.servlet.http.HttpServletResponse response, String name, String value, Integer expiry, String domain) static voidcancleCookie(String contextPath, String schema, jakarta.servlet.http.HttpServletResponse response, String name, String domain) static StringgetAccept(jakarta.servlet.http.HttpServletRequest request) static jakarta.servlet.http.Cookiestatic StringgetEncodePath(String path, String queryString) 获取转码路径static StringgetIpAddress(jakarta.servlet.http.HttpServletRequest request) static StringgetOrigin(jakarta.servlet.http.HttpServletRequest request) static StringgetUserAgent(jakarta.servlet.http.HttpServletRequest request) 获取UserAgentstatic Stringstatic StringremoveCRLF(String string) static voidremoveCRLF(String[] values)
-
字段详细资料
-
CRLF
- 另请参阅:
-
-
构造器详细资料
-
RequestUtils
private RequestUtils()
-
-
方法详细资料
-
getValue
- 参数:
parameterMap-key-- 返回:
- parameter value
-
getOrigin
- 参数:
request-- 返回:
- origin
-
getEncodePath
获取转码路径- 参数:
path-queryString-- 返回:
- encoded path
-
removeCRLF
- 参数:
string-- 返回:
-
removeCRLF
- 参数:
values-
-
getUserAgent
获取UserAgent- 参数:
request-- 返回:
- user agent
-
getAccept
- 参数:
request-- 返回:
- accept
-
getCookie
public static jakarta.servlet.http.Cookie getCookie(jakarta.servlet.http.Cookie[] cookies, String name) - 参数:
cookies-name-- 返回:
- cookie
-
addCookie
public static jakarta.servlet.http.Cookie addCookie(String contextPath, String schema, jakarta.servlet.http.HttpServletResponse response, String name, String value, Integer expiry, String domain) - 参数:
contextPath-schema-response-name-value-expiry-domain-- 返回:
- cookie
-
cancleCookie
public static void cancleCookie(String contextPath, String schema, jakarta.servlet.http.HttpServletResponse response, String name, String domain) - 参数:
contextPath-schema-response-name-domain-
-
getIpAddress
- 参数:
request-- 返回:
- ip address
-