olp-cpp-sdk
1.21.0
|
Provides a platform specific network abstraction layer. More...
Classes | |
struct | CertificateSettings |
Settings for custom network certificate. More... | |
class | HttpStatusCode |
HTTP status codes, as specified in RFC7231. More... | |
class | Network |
An HTTP client abstraction. More... | |
struct | NetworkInitializationSettings |
Settings for network initialization. More... | |
class | NetworkProxySettings |
Contains a proxy configuration for the network interface that is applied per request. More... | |
class | NetworkRequest |
A network request abstraction for an HTTP request. More... | |
class | NetworkResponse |
A network response abstraction for the HTTP request. More... | |
class | NetworkSettings |
Contains a configuration for the network. More... | |
class | SendOutcome |
Rrepresents the outcome of a network request. More... | |
class | NetworkUtils |
Network internal utilities. More... | |
Typedefs | |
using | RequestId = std::uint64_t |
A unique request ID. More... | |
using | Header = std::pair< std::string, std::string > |
An alias for the HTTP header. | |
using | Headers = std::vector< Header > |
An alias for a vector of the HTTP headers. | |
Enumerations | |
enum class | RequestIdConstants : RequestId { RequestIdInvalid = std::numeric_limits<RequestId>::min() , RequestIdMin = std::numeric_limits<RequestId>::min() + 1 , RequestIdMax = std::numeric_limits<RequestId>::max() } |
The list of special values for NetworkRequestId . More... | |
enum class | ErrorCode { SUCCESS = 0 , IO_ERROR = -1 , AUTHORIZATION_ERROR = -2 , INVALID_URL_ERROR = -3 , OFFLINE_ERROR = -4 , CANCELLED_ERROR = -5 , AUTHENTICATION_ERROR = -6 , TIMEOUT_ERROR = -7 , NETWORK_OVERLOAD_ERROR = -8 , UNKNOWN_ERROR = -9 } |
The common Network error codes. More... | |
Functions | |
CORE_API std::shared_ptr< Network > | CreateDefaultNetwork (NetworkInitializationSettings settings) |
Creates a default Network implementation. | |
CORE_API std::string | ErrorCodeToString (ErrorCode code) |
The helper function that converts an error code to a human readable string. | |
CORE_API std::string | HttpErrorToString (int http_status) |
Converts the HTTP error status code to string. More... | |
Provides a platform specific network abstraction layer.
using olp::http::RequestId = typedef std::uint64_t |
A unique request ID.
Values of this type mark a unique request all the way until the request completion. This value is returned by Network::Send
and used by Network::Cancel
and NetworkResponse
so that the user can track the request until its completion.
|
strong |
The common Network
error codes.
|
strong |
CORE_API std::string olp::http::HttpErrorToString | ( | int | http_status | ) |
Converts the HTTP error status code to string.
http_status | The HTTP status. |