3 #include "HttpHeaders.h"
28 uint16_t cacheStatusCode,
30 std::vector<std::byte>&& cacheData)
31 : statusCode(cacheStatusCode),
32 headers(std::move(cacheHeaders)),
33 data(std::move(cacheData)) {}
48 std::vector<std::byte>
data;
64 std::string&& cacheMethod,
65 std::string&& cacheUrl)
66 : headers(std::move(cacheHeaders)),
67 method(std::move(cacheMethod)),
68 url(std::move(cacheUrl)) {}
98 std::time_t cacheExpiryTime,
101 : expiryTime(cacheExpiryTime),
102 cacheRequest(std::move(request)),
103 cacheResponse(std::move(response)) {}
Cache item retrieved from the cache database.
CacheItem(std::time_t cacheExpiryTime, CacheRequest &&request, CacheResponse &&response)
Constructor.
CacheRequest cacheRequest
The cache request owned by this cache item.
std::time_t expiryTime
The time point that this cache item is expired.
CacheResponse cacheResponse
The cache response owned by this cache item.
Cache request retrieved from the cache database.
std::string method
The method of the request.
std::string url
The url of the request.
HttpHeaders headers
The headers of the request.
CacheRequest(HttpHeaders &&cacheHeaders, std::string &&cacheMethod, std::string &&cacheUrl)
Constructor.
Cache response retrieved from the cache database.
HttpHeaders headers
The headers of the response.
CacheResponse(uint16_t cacheStatusCode, HttpHeaders &&cacheHeaders, std::vector< std::byte > &&cacheData)
Constructor.
std::vector< std::byte > data
The body data of the response.
uint16_t statusCode
The status code of the response.
Classes that support asynchronous operations.
std::map< std::string, std::string, CaseInsensitiveCompare > HttpHeaders
Http Headers that maps case-insensitive header key with header value.