Set User Agent

This commit is contained in:
cpp 2020-12-26 20:44:56 +01:00
parent a8c8b72e20
commit 8bd06434e3
1 changed files with 1 additions and 0 deletions

1
http.c
View File

@ -22,6 +22,7 @@ char* request(char *url)
if(httpHandler) {
curl_easy_setopt(httpHandler,CURLOPT_URL, url);
curl_easy_setopt(httpHandler,CURLOPT_WRITEFUNCTION, httpResponseCallback);
curl_easy_setopt(httpHandler,CURLOPT_USERAGENT, "cWikiBot/0.1 (https://git.zom.bi/cpp/cWikiBot; cpp@zom.bi) libcurl4/7.64.0");
curl_easy_setopt(httpHandler,CURLOPT_WRITEDATA, (void *)&httpResponse);
return_code = curl_easy_perform(httpHandler);
}