T - The deserialized type of the response content.public class SimpleResponse<T> extends Object implements Response<T>
| Constructor and Description |
|---|
SimpleResponse(HttpRequest request,
int statusCode,
HttpHeaders headers,
T value)
Creates a
SimpleResponse. |
SimpleResponse(Response<?> response,
T value)
Creates a
SimpleResponse from a response and a value. |
| Modifier and Type | Method and Description |
|---|---|
HttpHeaders |
getHeaders()
Gets the headers from the HTTP response.
|
HttpRequest |
getRequest()
Gets the request which resulted in this
SimpleResponse. |
int |
getStatusCode()
Gets the status code of the HTTP response.
|
T |
getValue()
Gets the deserialized value of the HTTP response.
|
public SimpleResponse(HttpRequest request, int statusCode, HttpHeaders headers, T value)
SimpleResponse.request - The request which resulted in this response.statusCode - The status code of the HTTP response.headers - The headers of the HTTP response.value - The deserialized value of the HTTP response.public SimpleResponse(Response<?> response, T value)
SimpleResponse from a response and a value.response - The response that needs to be mapped.value - The value to put into the new response.public HttpRequest getRequest()
SimpleResponse.getRequest in interface Response<T>SimpleResponse.public int getStatusCode()
getStatusCode in interface Response<T>public HttpHeaders getHeaders()
getHeaders in interface Response<T>Copyright © 2020 Microsoft Corporation. All rights reserved.