D++ (DPP)
C++ Discord API Bot Library
dpp::http_request_completion_t Struct Reference

The result of any HTTP request. Contains the headers, vital rate limit figures, and returned request body. More...

+ Collaboration diagram for dpp::http_request_completion_t:

Public Attributes

std::multimap< std::string, std::string > headers
 HTTP headers of response. More...
 
uint16_t status = 0
 HTTP status. e.g. 200 = OK, 404 = Not found, 429 = Rate limited, etc. More...
 
http_error error = h_success
 Error status. e.g. if the request could not connect at all. More...
 
std::string ratelimit_bucket
 Ratelimit bucket. More...
 
uint64_t ratelimit_limit = 0
 Ratelimit limit of requests. More...
 
uint64_t ratelimit_remaining = 0
 Ratelimit remaining requests. More...
 
uint64_t ratelimit_reset_after = 0
 Ratelimit reset after (seconds). More...
 
uint64_t ratelimit_retry_after = 0
 Ratelimit retry after (seconds). More...
 
bool ratelimit_global = false
 True if this request has caused us to be globally rate limited. More...
 
std::string body
 Reply body. More...
 
double latency
 Ping latency. More...
 

Detailed Description

The result of any HTTP request. Contains the headers, vital rate limit figures, and returned request body.

Member Data Documentation

◆ body

std::string dpp::http_request_completion_t::body

Reply body.

◆ error

http_error dpp::http_request_completion_t::error = h_success

Error status. e.g. if the request could not connect at all.

◆ headers

std::multimap<std::string, std::string> dpp::http_request_completion_t::headers

HTTP headers of response.

◆ latency

double dpp::http_request_completion_t::latency

Ping latency.

◆ ratelimit_bucket

std::string dpp::http_request_completion_t::ratelimit_bucket

Ratelimit bucket.

◆ ratelimit_global

bool dpp::http_request_completion_t::ratelimit_global = false

True if this request has caused us to be globally rate limited.

◆ ratelimit_limit

uint64_t dpp::http_request_completion_t::ratelimit_limit = 0

Ratelimit limit of requests.

◆ ratelimit_remaining

uint64_t dpp::http_request_completion_t::ratelimit_remaining = 0

Ratelimit remaining requests.

◆ ratelimit_reset_after

uint64_t dpp::http_request_completion_t::ratelimit_reset_after = 0

Ratelimit reset after (seconds).

◆ ratelimit_retry_after

uint64_t dpp::http_request_completion_t::ratelimit_retry_after = 0

Ratelimit retry after (seconds).

◆ status

uint16_t dpp::http_request_completion_t::status = 0

HTTP status. e.g. 200 = OK, 404 = Not found, 429 = Rate limited, etc.

D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0