Package org.azd.abstractions
Class ApiResponse
java.lang.Object
org.azd.abstractions.ApiResponse
Container class that holds Api request and response information.
-
Constructor Summary
ConstructorDescriptionApiResponse
(HttpStatusCode statusCode, Map<String, List<String>> responseHeadersMap, Object responseBody, String requestUrl, RequestInformation requestInformation) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the continuation token from response header.Get the request information object.Get the request url.Get the response body.Get the response headers.Get the response headers map.Get the status code.
-
Constructor Details
-
ApiResponse
public ApiResponse(HttpStatusCode statusCode, Map<String, List<String>> responseHeadersMap, Object responseBody, String requestUrl, RequestInformation requestInformation)
-
-
Method Details
-
getStatusCode
Get the status code.- Returns:
- Http status code
HttpStatusCode
-
getResponseHeaders
Get the response headers.- Returns:
- Http headers
HttpHeaders
.
-
getResponseHeadersMap
Get the response headers map.- Returns:
- Map of response headers.
-
getResponseBody
Get the response body.- Returns:
- Object of response body.
-
getRequestUrl
Get the request url.- Returns:
- Request url.
-
getRequestInformation
Get the request information object.- Returns:
- RequestInformation object
RequestInformation
.
-
getContinuationToken
Retrieves the continuation token from response header. This can then be used for getting the paginated response. Note that not all the Apis return continuation token in the headers. If the header value "x-ms-continuationtoken" is present then it will be returned or an empty string will be returned.- Returns:
- String value.
-