3#include "HttpHeaders.h"
27 uint16_t cacheStatusCode,
29 std::vector<std::byte>&& cacheData)
30 : statusCode(cacheStatusCode),
31 headers(
std::move(cacheHeaders)),
32 data(
std::move(cacheData)) {}
47 std::vector<std::byte>
data;
63 std::string&& cacheMethod,
64 std::string&& cacheUrl)
65 : headers(
std::move(cacheHeaders)),
66 method(
std::move(cacheMethod)),
67 url(
std::move(cacheUrl)) {}
97 std::time_t cacheExpiryTime,
100 : expiryTime(cacheExpiryTime),
101 cacheRequest(
std::move(request)),
102 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.