Package com.azure.android.core.rest
Class ResponseBase<H,T>
- java.lang.Object
-
- com.azure.android.core.rest.ResponseBase<H,T>
-
- Type Parameters:
H- The deserialized type of the response headers.T- The deserialized type of the response value, available fromResponse.getValue().
- All Implemented Interfaces:
Response<T>
public class ResponseBase<H,T> extends java.lang.Object implements Response<T>
The response of a REST request.
-
-
Constructor Summary
Constructors Constructor Description ResponseBase(com.azure.android.core.http.HttpRequest request, int statusCode, com.azure.android.core.http.HttpHeaders headers, T value, H deserializedHeaders)Creates aResponseBase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HgetDeserializedHeaders()Get the headers from the HTTP response, transformed into the header type,H.com.azure.android.core.http.HttpHeadersgetHeaders()Gets the headers from the HTTP response.com.azure.android.core.http.HttpRequestgetRequest()Gets The request which resulted in thisResponseBase.intgetStatusCode()Gets the HTTP response status code.TgetValue()Gets the deserialized value of the HTTP response.
-
-
-
Constructor Detail
-
ResponseBase
public ResponseBase(com.azure.android.core.http.HttpRequest request, int statusCode, com.azure.android.core.http.HttpHeaders headers, T value, H deserializedHeaders)Creates aResponseBase.- 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 Detail
-
getRequest
public com.azure.android.core.http.HttpRequest getRequest()
Gets The request which resulted in thisResponseBase.- Specified by:
getRequestin interfaceResponse<H>- Returns:
- The request which resulted in this
ResponseBase.
-
getStatusCode
public int getStatusCode()
Gets the HTTP response status code.- Specified by:
getStatusCodein interfaceResponse<H>- Returns:
- The status code of the HTTP response.
-
getHeaders
public com.azure.android.core.http.HttpHeaders getHeaders()
Gets the headers from the HTTP response.- Specified by:
getHeadersin interfaceResponse<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.
-
-