quickjs-tart

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

CURLOPT_PROXY_SERVICE_NAME.md (1450B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_PROXY_SERVICE_NAME
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_PROXY (3)
      9   - CURLOPT_PROXYTYPE (3)
     10   - CURLOPT_SERVICE_NAME (3)
     11 Protocol:
     12   - All
     13 Added-in: 7.43.0
     14 ---
     15 
     16 # NAME
     17 
     18 CURLOPT_PROXY_SERVICE_NAME - proxy authentication service name
     19 
     20 # SYNOPSIS
     21 
     22 ~~~c
     23 #include <curl/curl.h>
     24 
     25 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SERVICE_NAME,
     26                           char *name);
     27 ~~~
     28 
     29 # DESCRIPTION
     30 
     31 Pass a char pointer as parameter to a string holding the *name* of the
     32 service. The default service name is **"HTTP"** for HTTP based proxies and
     33 **"rcmd"** for SOCKS5. This option allows you to change it.
     34 
     35 The application does not have to keep the string around after setting this
     36 option.
     37 
     38 Using this option multiple times makes the last set string override the
     39 previous ones. Set it to NULL to disable its use again.
     40 
     41 # DEFAULT
     42 
     43 See above
     44 
     45 # %PROTOCOLS%
     46 
     47 # EXAMPLE
     48 
     49 ~~~c
     50 int main(void)
     51 {
     52   CURL *curl = curl_easy_init();
     53   if(curl) {
     54     CURLcode ret;
     55     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     56     curl_easy_setopt(curl, CURLOPT_PROXY_SERVICE_NAME, "custom");
     57     ret = curl_easy_perform(curl);
     58   }
     59 }
     60 ~~~
     61 
     62 # %AVAILABILITY%
     63 
     64 # RETURN VALUE
     65 
     66 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     67 
     68 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     69 libcurl-errors(3).