Class ResponseBase<H,T>

java.lang.Object
com.azure.core.http.rest.ResponseBase<H,T>
Type Parameters:
H - The deserialized type of the response headers.
T - The deserialized type of the response value, available from Response.getValue().
All Implemented Interfaces:
Response<T>
Direct Known Subclasses:
AttestationResponse, BlobDownloadAsyncResponse, BlobDownloadContentAsyncResponse, BlobDownloadContentResponse, BlobDownloadResponse, BlobQueryAsyncResponse, BlobQueryResponse, DataFlowDebugSessionsCreateDataFlowDebugSessionResponse, DataFlowDebugSessionsExecuteCommandResponse, DetectAnomalyResponse, DigitalTwinsResponse, FileQueryAsyncResponse, FileQueryResponse, FileReadAsyncResponse, FileReadResponse, RoleAssignmentsListRoleAssignmentsResponse, ShareFileDownloadAsyncResponse, ShareFileDownloadResponse, TrainMultivariateModelResponse

public class ResponseBase<H,T> extends Object implements Response<T>
The response of a REST request.
  • Constructor Details

    • ResponseBase

      public ResponseBase(HttpRequest request, int statusCode, HttpHeaders headers, T value, H deserializedHeaders)
      Creates a ResponseBase.
      Parameters:
      request - The HTTP request which resulted in this response.
      statusCode - The status code of the HTTP response.
      headers - The headers of the HTTP response.
      deserializedHeaders - The deserialized headers of the HTTP response.
      value - The deserialized value of the HTTP response.
  • Method Details

    • getRequest

      public HttpRequest getRequest()
      Gets The request which resulted in this ResponseBase.
      Specified by:
      getRequest in interface Response<H>
      Returns:
      The request which resulted in this ResponseBase.
    • getStatusCode

      public int getStatusCode()
      Gets the HTTP response status code.
      Specified by:
      getStatusCode in interface Response<H>
      Returns:
      The status code of the HTTP response.
    • getHeaders

      public HttpHeaders getHeaders()
      Gets the headers from the HTTP response.
      Specified by:
      getHeaders in interface Response<H>
      Returns:
      The HTTP response headers.
    • getDeserializedHeaders

      public H getDeserializedHeaders()
      Get the headers from the HTTP response, transformed into the header type, H.
      Returns:
      An instance of header type H, deserialized from the HTTP response headers.
    • getValue

      public T getValue()
      Gets the deserialized value of the HTTP response.
      Specified by:
      getValue in interface Response<H>
      Returns:
      The deserialized value of the HTTP response.