接口 ServerHttpRequest
public interface ServerHttpRequest extends HttpRequest, ReactiveHttpInputMessage
Represents a reactive server-side HTTP request.- 从以下版本开始:
- 5.0
- 作者:
- Arjen Poutsma, Rossen Stoyanchev, Sam Brannen
嵌套类概要
嵌套类 修饰符和类型 接口 说明 static interface
ServerHttpRequest.Builder
Builder for mutating an existingServerHttpRequest
.
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 MultiValueMap<String,HttpCookie>
getCookies()
Return a read-only map of cookies sent by the client.String
getId()
Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.default InetSocketAddress
getLocalAddress()
Return the local address the request was accepted on, if available.RequestPath
getPath()
Returns a structured representation of the request path including the context path + path within application portions, path segments with encoded and decoded values, and path parameters.MultiValueMap<String,String>
getQueryParams()
Return a read-only map with parsed and decoded query parameter values.default InetSocketAddress
getRemoteAddress()
Return the remote address where this request is connected to, if available.default SslInfo
getSslInfo()
Return the SSL session information if the request has been transmitted over a secure protocol including SSL certificates, if available.default ServerHttpRequest.Builder
mutate()
Return a builder to mutate properties of this request by wrapping it withServerHttpRequestDecorator
and returning either mutated values or delegating back to this instance.从接口继承的方法 org.springframework.http.HttpMessage
getHeaders
从接口继承的方法 org.springframework.http.HttpRequest
getMethod, getMethodValue, getURI
从接口继承的方法 org.springframework.http.ReactiveHttpInputMessage
getBody
方法详细资料
getId
String getId()
Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.- 从以下版本开始:
- 5.1
- 另请参阅:
ServerWebExchange.getLogPrefix()
getPath
RequestPath getPath()
Returns a structured representation of the request path including the context path + path within application portions, path segments with encoded and decoded values, and path parameters.
getQueryParams
MultiValueMap<String,String> getQueryParams()
Return a read-only map with parsed and decoded query parameter values.
getCookies
MultiValueMap<String,HttpCookie> getCookies()
Return a read-only map of cookies sent by the client.
getLocalAddress
@Nullable default InetSocketAddress getLocalAddress()
Return the local address the request was accepted on, if available.- 从以下版本开始:
- 5.2.3
getRemoteAddress
@Nullable default InetSocketAddress getRemoteAddress()
Return the remote address where this request is connected to, if available.
getSslInfo
@Nullable default SslInfo getSslInfo()
Return the SSL session information if the request has been transmitted over a secure protocol including SSL certificates, if available.- 返回:
- the session information, or
null
if none available - 从以下版本开始:
- 5.0.2
mutate
default ServerHttpRequest.Builder mutate()
Return a builder to mutate properties of this request by wrapping it withServerHttpRequestDecorator
and returning either mutated values or delegating back to this instance.