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
@ -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…
Reference in New Issue
Block a user