1curl_easy_option_by_id(3)       libcurl Manual       curl_easy_option_by_id(3)
2
3
4

NAME

6       curl_easy_option_by_id - find an easy setopt option by id
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       const struct curl_easyoption *curl_easy_option_by_id(CURLoption id);
12

DESCRIPTION

14       Given  a  CURLoption  id,  this  function  returns  a  pointer  to  the
15       curl_easyoption struct, holding  information  about  the  curl_easy_se‐
16       topt(3) option using that id. The option id is the CURLOPT_ prefix ones
17       provided in the standard curl/curl.h header file.  This  function  will
18       return  the  non-aliases  version for the cases where there is an alias
19       function as well.
20
21       If libcurl has no option with the given id, this function returns NULL.
22

EXAMPLE

24       const struct curl_easyoption *opt = curl_easy_option_by_id(CURLOPT_URL);
25       if(opt) {
26         printf("This option wants type %x\n", opt->type);
27       }
28

AVAILABILITY

30       This function was added in libcurl 7.73.0
31

RETURN VALUE

33       A pointer to the curl_easyoption struct for the option or NULL.
34

SEE ALSO

36       curl_easy_option_by_name(3),curl_easy_option_next(3),     curl_easy_se‐
37       topt(3),
38
39
40
41libcurl 8.0.1                  January 02, 2023      curl_easy_option_by_id(3)
Impressum