Interface OperationResponse


public interface OperationResponse
The response that was received as part of performing an operation on a RESTful service.
Author:
Andy Wilkinson
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Returns the content of the response.
    Returns the content of the response as a String.
    org.springframework.http.HttpHeaders
    Returns the headers in the response.
    org.springframework.http.HttpStatus
    Returns the status of the response.
    default int
    Returns the status code of the response.
  • Method Details

    • getStatus

      org.springframework.http.HttpStatus getStatus()
      Returns the status of the response.
      Returns:
      the status or null if the status is unknown to HttpStatus
    • getStatusCode

      default int getStatusCode()
      Returns the status code of the response.
      Returns:
      the status code
    • 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