added user agent: OpenSpace, to http-request

This commit is contained in:
ElonOlsson
2022-03-14 16:09:31 -04:00
parent 2d7e8f9967
commit f29dee2fe3
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ std::future<DownloadManager::MemoryFile> DownloadManager::fetchFile(
curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); // NOLINT
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); // NOLINT
// NOLINTNEXTLINE
curl_easy_setopt(curl, CURLOPT_USERAGENT, "OpenSpace"); // NOLINT
curl_easy_setopt(curl, CURLOPT_WRITEDATA, reinterpret_cast<void*>(&file));
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writeMemoryCallback); // NOLINT
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 5L); // NOLINT
+1
View File
@@ -58,6 +58,7 @@ bool HttpRequest::perform(std::chrono::milliseconds timeout) {
}
curl_easy_setopt(curl, CURLOPT_URL, _url.data());
curl_easy_setopt(curl, CURLOPT_USERAGENT, "OpenSpace"); // NOLINT
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
// The leading + in all of the lambda expressions are to cause an implicit conversion