1CURLOPT_PROXYUSERPWD(3)             libcurl            CURLOPT_PROXYUSERPWD(3)
2
3
4

NAME

6       CURLOPT_PROXYUSERPWD  - user name and password to use for proxy authen‐
7       tication
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYUSERPWD, char *userpwd);
13

DESCRIPTION

15       Pass a char * as parameter, which should be [user  name]:[password]  to
16       use  for  the connection to the HTTP proxy. Both the name and the pass‐
17       word will be URL decoded before use, so to include for example a  colon
18       in the user name you should encode it as %3A. (This is different to how
19       CURLOPT_USERPWD(3) is used - beware.)
20
21       Use CURLOPT_PROXYAUTH(3) to specify the authentication method.
22
23       The application does not have to keep the string around  after  setting
24       this option.
25

DEFAULT

27       This is NULL by default.
28

PROTOCOLS

30       Used with all protocols that can use a proxy
31

EXAMPLE

33       CURL *curl = curl_easy_init();
34       if(curl) {
35         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
36         curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080");
37         curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "clark%20kent:superman");
38         ret = curl_easy_perform(curl);
39         curl_easy_cleanup(curl);
40       }
41

AVAILABILITY

43       Always
44

RETURN VALUE

46       Returns CURLE_OK if proxies are supported, CURLE_UNKNOWN_OPTION if not,
47       or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
48

SEE ALSO

50       CURLOPT_PROXY(3), CURLOPT_PROXYTYPE(3),
51
52
53
54ibcurl 8.2.1                    April 26, 2023         CURLOPT_PROXYUSERPWD(3)
Impressum