add HttpRequest::timeoutMs

This commit is contained in:
MihailRis 2026-09-11 21:17:01 +03:00
parent f44d3355f9
commit a5f9eafe23
2 changed files with 4 additions and 0 deletions

View file

@ -82,6 +82,9 @@ public:
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &entry->buffer);
curl_easy_setopt(curl, CURLOPT_USERAGENT, "curl/7.81.0");
if (request.timeoutMs > 0) {
curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, request.timeoutMs);
}
#ifndef NDEBUG
// curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
#endif