Set the appropriate headers to use API versioning

This commit is contained in:
smallmodel 2025-03-13 23:42:50 +01:00
parent fecd1eb505
commit e6f5d76abe
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -360,7 +360,15 @@ void UpdateCheckerThread::DoRequest()
curl_easy_setopt(handle, CURLOPT_WRITEDATA, &callbackData);
curl_easy_setopt(handle, CURLOPT_MAXFILESIZE, MAX_BUFFER_SIZE);
struct curl_slist *list = NULL;
list = curl_slist_append(list, "Accept: application/vnd.github+json");
list = curl_slist_append(list, "X-GitHub-Api-Version: 2022-11-28");
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, list);
result = curl_easy_perform(handle);
curl_slist_free_all(list);
if (result != CURLE_OK) {
return;
}