From 8bd06434e39ca71d5e5c216683a2fc0d1294a6e5 Mon Sep 17 00:00:00 2001 From: Jonas Date: Sat, 26 Dec 2020 20:44:56 +0100 Subject: [PATCH] Set User Agent --- http.c | 1 + 1 file changed, 1 insertion(+) diff --git a/http.c b/http.c index bbfc027..ead8ee3 100644 --- a/http.c +++ b/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); }