add user agent to installer

This commit is contained in:
Adeeb Shihadeh
2020-11-30 16:57:41 -08:00
parent ff91d30b16
commit 7560e67b3d
+3
View File
@@ -13,6 +13,8 @@
#include "setup.hpp"
#include "qt_window.hpp"
#define USER_AGENT "AGNOS-0.1"
int download(std::string url) {
CURL *curl;
curl = curl_easy_init();
@@ -25,6 +27,7 @@ int download(std::string url) {
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, NULL);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
curl_easy_setopt (curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt (curl, CURLOPT_USERAGENT, USER_AGENT);
curl_easy_perform(curl);
curl_easy_cleanup(curl);
fclose(fp);