cesium-native 0.43.0
|
A response from Cesium ion. More...
#include <CesiumIonClient/Response.h>
Public Member Functions | |
Response () | |
Creates a new empty Response . | |
Response (const std::shared_ptr< CesiumAsync::IAssetRequest > &pRequest, T &&value) | |
Creates a Response from a completed request and a response value. | |
Response (T &&value, uint16_t httpStatusCode, const std::string &errorCode, const std::string &errorMessage) | |
Creates a Response from a response value, status code, and error information. | |
Response (uint16_t httpStatusCode, const std::string &errorCode, const std::string &errorMessage) | |
Creates a Response with no value, a status code, and error information. | |
Public Attributes | |
std::optional< T > | value |
The response value, or std::nullopt if the response was unsuccessful. | |
uint16_t | httpStatusCode |
The HTTP status code returned by Cesium ion. | |
std::string | errorCode |
The error code, or empty string if there was no error. | |
std::string | errorMessage |
The error message returned, or an empty string if there was no error. | |
std::optional< std::string > | nextPageUrl |
The URL to use to obtain the next page of results, if there is a next page. | |
std::optional< std::string > | previousPageUrl |
The URL to use to obtain the previous page of results, if there is one. | |
A response from Cesium ion.
T | The type of the response object. |
Definition at line 19 of file Response.h.
CesiumIonClient::Response< T >::Response | ( | const std::shared_ptr< CesiumAsync::IAssetRequest > & | pRequest, |
T && | value ) |
Creates a Response
from a completed request and a response value.
pRequest | A completed request. The constructor will attempt to obtain the httpStatusCode , previousPageUrl , and nextPageUrl from this request. |
value | The response value. |
CesiumIonClient::Response< T >::Response | ( | T && | value, |
uint16_t | httpStatusCode, | ||
const std::string & | errorCode, | ||
const std::string & | errorMessage ) |
Creates a Response
from a response value, status code, and error information.
value | The response value. |
httpStatusCode | The HTTP status code of the response. |
errorCode | The error code. See Response::errorCode. If no error occurred, pass an empty string. |
errorMessage | The error message. See Response::errorMessage. If no error occurred, pass an empty string. |
CesiumIonClient::Response< T >::Response | ( | uint16_t | httpStatusCode, |
const std::string & | errorCode, | ||
const std::string & | errorMessage ) |
Creates a Response
with no value, a status code, and error information.
httpStatusCode | The HTTP status code of the response. |
errorCode | The error code. See Response::errorCode. |
errorMessage | The error message. See Response::errorMessage. |
std::string CesiumIonClient::Response< T >::errorCode |
The error code, or empty string if there was no error.
If no response is received at all, the code will be "NoResponse"
.
If Cesium ion returns an error, this will be the code
reported by Cesium ion.
If Cesium ion reports success but an error occurs while attempting to parse the response, the code will be "ParseError"
.
Definition at line 90 of file Response.h.
std::string CesiumIonClient::Response< T >::errorMessage |
The error message returned, or an empty string if there was no error.
If Cesium ion returns an error, this will be the message
reported by Cesium ion. If Cesium ion reports success but another error occurs, the message will contain further details of the error.
Definition at line 100 of file Response.h.
uint16_t CesiumIonClient::Response< T >::httpStatusCode |
The HTTP status code returned by Cesium ion.
Definition at line 76 of file Response.h.
std::optional<std::string> CesiumIonClient::Response< T >::nextPageUrl |
The URL to use to obtain the next page of results, if there is a next page.
Call Connection::nextPage
rather than using this field directly.
Definition at line 108 of file Response.h.
std::optional<std::string> CesiumIonClient::Response< T >::previousPageUrl |
The URL to use to obtain the previous page of results, if there is one.
Call Connection::previousPage
rather than using this field directly.
Definition at line 116 of file Response.h.
std::optional<T> CesiumIonClient::Response< T >::value |
The response value, or std::nullopt
if the response was unsuccessful.
Definition at line 71 of file Response.h.