Interface OperationResponse
public interface OperationResponse
The response that was received as part of performing an operation on a RESTful service.
- Author:
- Andy Wilkinson, Clyde Stubbs
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the content of the response.Returns the content of the response as aString
.Returns thecookies
returned with the response.org.springframework.http.HttpHeaders
Returns the headers in the response.org.springframework.http.HttpStatusCode
Returns the status of the response.
-
Method Details
-
getStatus
org.springframework.http.HttpStatusCode getStatus()Returns the status of the response.- Returns:
- the status, never
null
-
getHeaders
org.springframework.http.HttpHeaders getHeaders()Returns the headers in the response.- Returns:
- the headers
-
getContent
byte[] getContent()Returns the content of the response. If the response has no content an empty array is returned.- Returns:
- the contents, never
null
-
getContentAsString
String getContentAsString()Returns the content of the response as aString
. If the response has no content an empty string is returned. If the response has aContent-Type
header that specifies a charset then that charset will be used when converting the contents to aString
.- Returns:
- the contents as string, never
null
-
getCookies
Collection<ResponseCookie> getCookies()Returns thecookies
returned with the response. If no cookies were returned an empty collection is returned.- Returns:
- the cookies, never
null
- Since:
- 3.0
-