mirror of
https://github.com/curl/curl.git
synced 2026-07-23 01:47:16 +03:00
Set CURLOPT_USERAGENT too
This commit is contained in:
parent
bd3aba5d6a
commit
662cb30372
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue