CURLOPT_NOPROGRESS.md (1308B)
1 --- 2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3 SPDX-License-Identifier: curl 4 Title: CURLOPT_NOPROGRESS 5 Section: 3 6 Source: libcurl 7 See-also: 8 - CURLOPT_DEBUGFUNCTION (3) 9 - CURLOPT_PROGRESSFUNCTION (3) 10 - CURLOPT_VERBOSE (3) 11 - CURLOPT_XFERINFOFUNCTION (3) 12 Protocol: 13 - All 14 Added-in: 7.1 15 --- 16 17 # NAME 18 19 CURLOPT_NOPROGRESS - switch off the progress meter 20 21 # SYNOPSIS 22 23 ~~~c 24 #include <curl/curl.h> 25 26 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROGRESS, long onoff); 27 ~~~ 28 29 # DESCRIPTION 30 31 If *onoff* is to 1, it tells the library to shut off the progress meter 32 completely for requests done with this *handle*. It also prevents the 33 CURLOPT_XFERINFOFUNCTION(3) or CURLOPT_PROGRESSFUNCTION(3) from 34 getting called. 35 36 # DEFAULT 37 38 1, meaning it normally runs without a progress meter. 39 40 # %PROTOCOLS% 41 42 # EXAMPLE 43 44 ~~~c 45 int main(void) 46 { 47 CURL *curl = curl_easy_init(); 48 if(curl) { 49 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); 50 51 /* enable progress meter */ 52 curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L); 53 54 /* Perform the request */ 55 curl_easy_perform(curl); 56 } 57 } 58 ~~~ 59 60 # %AVAILABILITY% 61 62 # RETURN VALUE 63 64 curl_easy_setopt(3) returns a CURLcode indicating success or error. 65 66 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see 67 libcurl-errors(3).