Skip to content
Snippets Groups Projects
Commit 662cb303 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Set CURLOPT_USERAGENT too

parent bd3aba5d
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,10 @@ int main(int argc, char **argv)
/* we pass our 'chunk' struct to the callback function */
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
/* some servers don't like requests that are made withput a user-agent
field, so we provide one */
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
/* get it! */
curl_easy_perform(curl_handle);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment