public class RequestUtils extends RequestUtils
CLIENT_IP_HEADERS, DEFAULT_IP, MOBILE_MAPS
限定符和类型 | 方法和说明 |
---|---|
static String |
getAuthority(org.springframework.http.server.reactive.ServerHttpRequest request)
获取请求的 URL 的权威部分
|
static String |
getClientIp(org.springframework.http.server.reactive.ServerHttpRequest request)
获取客户端真实 IP 地址
|
static String |
getDomain(org.springframework.http.server.reactive.ServerHttpRequest request)
已过时。
|
static String |
getHost(org.springframework.http.server.reactive.ServerHttpRequest request)
获取请求的真实主机地址
|
static int |
getPort(org.springframework.http.server.reactive.ServerHttpRequest request)
获取请求的真实端口
|
static org.springframework.http.server.reactive.ServerHttpResponse |
getResponse()
获取当前请求
ServerHttpResponse 实例 |
static String |
getScheme(org.springframework.http.server.reactive.ServerHttpRequest request)
获取请求的真实 Scheme
|
static boolean |
isAjaxRequest(org.springframework.http.server.reactive.ServerHttpRequest request)
判断是否为 Ajax 请求
|
static boolean |
isMobile(org.springframework.http.server.reactive.ServerHttpRequest request)
判断是否为移动端请求
|
getAuthority, getClientIp, getHost, getScheme, isAjaxRequest, isMobile, iteratorRequestHeader
public static org.springframework.http.server.reactive.ServerHttpResponse getResponse()
ServerHttpResponse
实例ServerHttpResponse
实例public static String getClientIp(org.springframework.http.server.reactive.ServerHttpRequest request)
request
- ServerHttpRequestpublic static boolean isAjaxRequest(org.springframework.http.server.reactive.ServerHttpRequest request)
request
- ServerHttpRequestpublic static boolean isMobile(org.springframework.http.server.reactive.ServerHttpRequest request)
request
- ServerHttpRequestpublic static String getScheme(org.springframework.http.server.reactive.ServerHttpRequest request)
request
- ServerHttpRequestpublic static String getHost(org.springframework.http.server.reactive.ServerHttpRequest request)
request
- ServerHttpRequest@Deprecated public static String getDomain(org.springframework.http.server.reactive.ServerHttpRequest request)
request
- ServerHttpRequestpublic static int getPort(org.springframework.http.server.reactive.ServerHttpRequest request)
request
- ServerHttpRequestpublic static String getAuthority(org.springframework.http.server.reactive.ServerHttpRequest request)
request
- HttpServletRequestCopyright © 2022 buession.com Inc.. All rights reserved.