add TimiSpring.getRequestArg
This commit is contained in:
@ -294,6 +294,26 @@ public class TimiSpring {
|
||||
getRequest().removeAttribute(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取请求 URL 参数
|
||||
*
|
||||
* @param key 键
|
||||
* @return 参数值
|
||||
*/
|
||||
public static String getRequestArg(String key) {
|
||||
return getRequest().getParameter(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取请求 URL 参数(多值)
|
||||
*
|
||||
* @param key 键
|
||||
* @return 参数值
|
||||
*/
|
||||
public static String[] getRequestArgs(String key) {
|
||||
return getRequest().getParameterValues(key);
|
||||
}
|
||||
|
||||
public static void addCookie(Cookie cookie) {
|
||||
getResponse().addCookie(cookie);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user