quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

curl_easy_option_by_name.md (1141B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: curl_easy_option_by_name
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - curl_easy_option_by_id (3)
      9   - curl_easy_option_next (3)
     10   - curl_easy_setopt (3)
     11 Protocol:
     12   - All
     13 Added-in: 7.73.0
     14 ---
     15 
     16 # NAME
     17 
     18 curl_easy_option_by_name - find an easy setopt option by name
     19 
     20 # SYNOPSIS
     21 
     22 ~~~c
     23 #include <curl/curl.h>
     24 
     25 const struct curl_easyoption *curl_easy_option_by_name(const char *name);
     26 ~~~
     27 
     28 # DESCRIPTION
     29 
     30 Given a **name**, this function returns a pointer to the *curl_easyoption*
     31 struct, holding information about the curl_easy_setopt(3) option using that
     32 name. The name should be specified without the `CURLOPT_` prefix and the name
     33 comparison is made case insensitive.
     34 
     35 If libcurl has no option with the given name, this function returns NULL.
     36 
     37 # %PROTOCOLS%
     38 
     39 # EXAMPLE
     40 
     41 ~~~c
     42 int main(void)
     43 {
     44   const struct curl_easyoption *opt = curl_easy_option_by_name("URL");
     45   if(opt) {
     46     printf("This option wants CURLoption %x\n", (int)opt->id);
     47   }
     48 }
     49 ~~~
     50 
     51 # %AVAILABILITY%
     52 
     53 # RETURN VALUE
     54 
     55 A pointer to the *curl_easyoption* struct for the option or NULL.