cesium-native  0.41.0
CesiumIonClient::Response< T > Struct Template Referencefinal

A response from Cesium ion. More...

#include <CesiumIonClient/Response.h>

Public Member Functions

 Response (const std::shared_ptr< CesiumAsync::IAssetRequest > &pRequest, T &&value)
 
 Response (T &&value, uint16_t httpStatusCode, const std::string &errorCode, const std::string &errorMessage)
 
 Response (uint16_t httpStatusCode, const std::string &errorCode, const std::string &errorMessage)
 

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. More...
 
std::string errorMessage
 The error message returned, or an empty string if there was no error. More...
 
std::optional< std::string > nextPageUrl
 The URL to use to obtain the next page of results, if there is a next page. More...
 
std::optional< std::string > previousPageUrl
 The URL to use to obtain the previous page of results, if there is one. More...
 

Detailed Description

template<typename T>
struct CesiumIonClient::Response< T >

A response from Cesium ion.

Template Parameters
TThe type of the response object.

Definition at line 19 of file Response.h.

Member Data Documentation

◆ errorCode

template<typename T >
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 60 of file Response.h.

◆ errorMessage

template<typename T >
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 70 of file Response.h.

◆ nextPageUrl

template<typename T >
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 78 of file Response.h.

◆ previousPageUrl

template<typename T >
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 86 of file Response.h.


The documentation for this struct was generated from the following file: