29 bool operator()(std::string_view left, std::string_view right)
const
31 return std::ranges::lexicographical_compare(left, right, {}, ToLower, ToLower);
35 static char ToLower(
char c) {
return c >=
'A' && c <= 'Z' ? static_cast<char>(c -
'A' +
'a') : c; }
39using HttpHeaders = std::map<std::string, std::string, HeaderNameLess>;
51 void AddAuth(std::string_view header, std::string_view scheme, std::string_view key)
56 scheme.empty() ? std::string(key) : std::string(scheme) +
" " + std::string(key);
84 void RunCompletions();
87 std::unique_ptr<Requests> _requests;
HttpClient(const HttpClient &)=delete
void Send(HttpRequest request, HttpCompletion onComplete)
HttpClient & operator=(const HttpClient &)=delete
HttpClient(Scheduler &scheduler)
One-shot delays and repeating timers, run on the game thread.
Owns one registration and releases it on destruction.
static void Patch(const char *name, void *object)
std::function< void(const HttpResult &)> HttpCompletion
std::map< std::string, std::string, HeaderNameLess > HttpHeaders
void AddAuth(std::string_view header, std::string_view scheme, std::string_view key)