fixed curl not working

This commit is contained in:
Václav Šmejkal 2022-04-05 19:28:23 +02:00
parent 904555b5c1
commit afe76b79d2

View File

@ -21,10 +21,13 @@ encryptText(char *text, char *keyNew)
CURL *curl = curl_easy_init(); CURL *curl = curl_easy_init();
FILE *fileBuffer = fopen("versions.json", "w"); FILE *fileBuffer = fopen("versions.json", "w");
//DOWNLOAD versions.json //GET versions.json
curl_easy_setopt(curl, CURLOPT_URL, "https://raw.githubusercontent.com/ENDev-WHY2/WHY2-Encryption-System/c/versions.json"); curl_easy_setopt(curl, CURLOPT_URL, "https://raw.githubusercontent.com/ENDev-WHY2/WHY2-Encryption-System/c/versions.json");
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fileBuffer); curl_easy_setopt(curl, CURLOPT_WRITEDATA, fileBuffer);
//DOWNLOAD versions.json
curl_easy_perform(curl);
//CLEANUP //CLEANUP
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
fclose(fileBuffer); fclose(fileBuffer);