Interface HttpResponse


  • public interface HttpResponse
    HTTP response abstraction for REST API invocations.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getHeader​(java.lang.String headerName)
      Returns the values of for a particular header name.
      java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders()
      Returns all HTTP headers.
      int getStatusCode()
      Returns the status code of the HTTP response.
    • Method Detail

      • getStatusCode

        int getStatusCode()
        Returns the status code of the HTTP response.
        Returns:
        the status code as int
      • getHeader

        java.util.List<java.lang.String> getHeader​(java.lang.String headerName)
        Returns the values of for a particular header name.

        If the header name appears multiple times in the HTTP response list of all values for that header name will be returned.

        Parameters:
        headerName - the name of the HTTP header to read
        Returns:
        list of header values; may be empty but will never be null.
      • getHeaders

        java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders()
        Returns all HTTP headers.
        Returns:
        map of header name to header values; may be empty but will never be null.
        See Also:
        getHeader(java.lang.String)