Class ServiceResponseWithHeaders<TBody,​THeader>

  • Type Parameters:
    TBody - the type of the response
    THeader - the type of the response header object

    public final class ServiceResponseWithHeaders<TBody,​THeader>
    extends ServiceResponse<TBody>
    An instance of this class holds a response object and a raw REST response.
    • Constructor Detail

      • ServiceResponseWithHeaders

        public ServiceResponseWithHeaders​(TBody body,
                                          THeader headers,
                                          retrofit2.Response<okhttp3.ResponseBody> response)
        Instantiate a ServiceResponse instance with a response object and a raw REST response.
        Parameters:
        body - deserialized response object
        headers - deserialized response header object
        response - raw REST response
      • ServiceResponseWithHeaders

        public ServiceResponseWithHeaders​(THeader headers,
                                          retrofit2.Response<Void> response)
        Instantiate a ServiceResponse instance with a response object and a raw REST response.
        Parameters:
        headers - deserialized response header object
        response - raw REST response
    • Method Detail

      • headers

        public THeader headers()
        Gets the response headers.
        Returns:
        the response headers. Null if there isn't one.