类 RequestUtils
java.lang.Object
com.publiccms.common.tools.RequestUtils
Request工具类
RequestUtils
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static jakarta.servlet.http.Cookie
addCookie
(String contextPath, String schema, jakarta.servlet.http.HttpServletResponse response, String name, String value, Integer expiry, String domain) static void
cancleCookie
(String contextPath, String schema, jakarta.servlet.http.HttpServletResponse response, String name, String domain) static String
getAccept
(jakarta.servlet.http.HttpServletRequest request) static jakarta.servlet.http.Cookie
static String
getEncodePath
(String path, String queryString) 获取转码路径static String
getIpAddress
(jakarta.servlet.http.HttpServletRequest request) static String
getOrigin
(jakarta.servlet.http.HttpServletRequest request) static String
getUserAgent
(jakarta.servlet.http.HttpServletRequest request) 获取UserAgentstatic String
static String
removeCRLF
(String string) static void
removeCRLF
(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
-