Interface OperationRequest
public interface OperationRequest
The request that was sent as part of performing an operation on a RESTful service.
- Author:
- Andy Wilkinson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the content of the request.Returns the content of the request as aString.Returns thecookiessent with the request.org.springframework.http.HttpHeadersReturns the headers that were included in the request.org.springframework.http.HttpMethodReturns the HTTP method of the request.Returns the request's parameters.getParts()Returns the request's parts, provided that it is a multipart request.getUri()Returns the request's URI.
-
Method Details
-
getContent
byte[] getContent()Returns the content of the request. If the request has no content an empty array is returned.- Returns:
- the contents, never
null
-
getContentAsString
String getContentAsString()Returns the content of the request as aString. If the request has no content an empty string is returned. If the request has aContent-Typeheader that specifies a charset then that charset will be used when converting the contents to aString.- Returns:
- the contents as string, never
null
-
getHeaders
org.springframework.http.HttpHeaders getHeaders()Returns the headers that were included in the request.- Returns:
- the headers
-
getMethod
org.springframework.http.HttpMethod getMethod()Returns the HTTP method of the request.- Returns:
- the HTTP method
-
getParameters
Parameters getParameters()Returns the request's parameters. For aGETrequest, the parameters are derived from the query string. For aPOSTrequest, the parameters are derived form the request's body.- Returns:
- the parameters
-
getParts
Collection<OperationRequestPart> getParts()Returns the request's parts, provided that it is a multipart request. If not, then an emptyCollectionis returned.- Returns:
- the parts
-
getUri
URI getUri()Returns the request's URI.- Returns:
- the URI
-
getCookies
Collection<RequestCookie> getCookies()Returns thecookiessent with the request. If no cookies were sent an empty collection is returned.- Returns:
- the cookies, never
null - Since:
- 1.2.0
-