mirror of
https://github.com/benapetr/stikkit.git
synced 2025-04-25 04:21:17 -05:00
Add version in useragent
This commit is contained in:
parent
3160b2f25f
commit
d9f75dc9d4
@ -129,10 +129,12 @@ int main(int argc, char *argv[])
|
||||
post += "&private=1";
|
||||
if (Stikkit::Configuration::Expiry != "0")
|
||||
post += "&expire=" + Stikkit::Configuration::Expiry;
|
||||
string useragent;
|
||||
useragent = "Stikkit " + Stikkit::Configuration::Version + " (https://github.com/benapetr/stikkit/)";
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, Stikkit::Configuration::URL.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, "stikkit");
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, useragent.c_str());
|
||||
|
||||
/* Perform the request, res will get the return HTTP code */
|
||||
res = curl_easy_perform(curl);
|
||||
|
Loading…
x
Reference in New Issue
Block a user