forked from cpp/cWikiBot
Set User Agent
This commit is contained in:
parent
a8c8b72e20
commit
8bd06434e3
1 changed files with 1 additions and 0 deletions
1
http.c
1
http.c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue