mirror of
https://github.com/curl/curl.git
synced 2026-05-30 06:47:28 +03:00
docs: add CURLOPT_NOPROGRESS to CURLOPT_XFERINFOFUNCTION example
It's important to set `CURLOPT_NOPROGRESS` to `0` if you want your transfer callback function, set by `CURLOPT_XFERINFOFUNCTION`, getting called. To emphasize this to the users, add this to the code example. Closes #13348
This commit is contained in:
parent
1087937992
commit
0f7be5a519
1 changed files with 3 additions and 0 deletions
|
|
@ -104,6 +104,9 @@ int main(void)
|
|||
/* pass struct to callback */
|
||||
curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &data);
|
||||
|
||||
/* enable progress callback getting called */
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, progress_callback);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue