Package org.springframework.http
Interface HttpRequest
- All Superinterfaces:
HttpMessage
- All Known Subinterfaces:
AsyncClientHttpRequest
,ClientHttpRequest
,ServerHttpRequest
,ServerHttpRequest
- All Known Implementing Classes:
AbstractClientHttpRequest
,AbstractServerHttpRequest
,HttpRequestWrapper
,MockAsyncClientHttpRequest
,MockClientHttpRequest
,MockServerHttpRequest
,RequestPartServletServerHttpRequest
,ServerHttpRequestDecorator
,ServletServerHttpRequest
public interface HttpRequest extends HttpMessage
- Since:
- 3.1
- Author:
- Arjen Poutsma
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description 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).Methods inherited from interface org.springframework.http.HttpMessage
getHeaders
Method Detail
getMethod
@Nullable default HttpMethod getMethod()
Return the HTTP method of the request.- Returns:
- the HTTP method as an HttpMethod enum value, or
null
if not resolvable (e.g. in case of a non-standard HTTP method) - See Also:
getMethodValue()
,HttpMethod.resolve(String)
getMethodValue
String getMethodValue()
Return the HTTP method of the request as a String value.- Returns:
- the HTTP method as a plain String
- Since:
- 5.0
- See Also:
getMethod()