Package com.azure.core.http.rest
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 fromResponse.getValue()
.
- All Implemented Interfaces:
Response<T>
The response of a REST request.
-
Constructor Summary
ConstructorDescriptionResponseBase
(HttpRequest request, int statusCode, HttpHeaders headers, T value, H deserializedHeaders) Creates aResponseBase
. -
Method Summary
Modifier and TypeMethodDescriptionGet the headers from the HTTP response, transformed into the header type,H
.Gets the headers from the HTTP response.Gets The request which resulted in thisResponseBase
.int
Gets the HTTP response status code.getValue()
Gets the deserialized value of the HTTP response.
-
Constructor Details
-
ResponseBase
public ResponseBase(HttpRequest request, int statusCode, 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 Details
-
getRequest
Gets The request which resulted in thisResponseBase
.- Specified by:
getRequest
in interfaceResponse<H>
- Returns:
- The request which resulted in this
ResponseBase
.
-
getStatusCode
public int getStatusCode()Gets the HTTP response status code.- Specified by:
getStatusCode
in interfaceResponse<H>
- Returns:
- The status code of the HTTP response.
-
getHeaders
Gets the headers from the HTTP response.- Specified by:
getHeaders
in interfaceResponse<H>
- Returns:
- The HTTP response headers.
-
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
Gets the deserialized value of the HTTP response.
-