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 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 a String. If the response has no content an empty string is returned. If the response has a Content-Type header that specifies a charset then that charset will be used when converting the contents to a String.
      Returns:
      the contents as string, never null
    • getCookies

      Collection<ResponseCookie> getCookies()
      Returns the cookies returned with the response. If no cookies were returned an empty collection is returned.
      Returns:
      the cookies, never null
      Since:
      3.0