接口 HttpRequest
- 所有超级接口:
HttpMessage
- 所有已知实现类:
AbstractClientHttpRequest
,AbstractServerHttpRequest
,HttpRequestWrapper
,MockAsyncClientHttpRequest
,MockClientHttpRequest
,MockServerHttpRequest
,RequestPartServletServerHttpRequest
,ServerHttpRequestDecorator
,ServletServerHttpRequest
public interface HttpRequest extends HttpMessage
- 从以下版本开始:
- 3.1
- 作者:
- Arjen Poutsma
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 default HttpMethod
getMethod()
Return the HTTP method of the request.String
getMethodValue()
Return the HTTP method of the request as a String value.URI
getURI()
Return the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).从接口继承的方法 org.springframework.http.HttpMessage
getHeaders
方法详细资料
getMethod
@Nullable default HttpMethod getMethod()
Return the HTTP method of the request.- 返回:
- the HTTP method as an HttpMethod enum value, or
null
if not resolvable (e.g. in case of a non-standard HTTP method) - 另请参阅:
getMethodValue()
,HttpMethod.resolve(String)
getMethodValue
String getMethodValue()
Return the HTTP method of the request as a String value.- 返回:
- the HTTP method as a plain String
- 从以下版本开始:
- 5.0
- 另请参阅:
getMethod()