1CURLOPT_PROXYUSERNAME(3)   curl_easy_setopt options   CURLOPT_PROXYUSERNAME(3)
2
3
4

NAME

6       CURLOPT_PROXYUSERNAME - user name to use for proxy authentication
7

SYNOPSIS

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

DESCRIPTION

15       Pass a char * as parameter, which should be pointing to the zero termiā€
16       nated user name to use for the transfer.
17
18       CURLOPT_PROXYUSERNAME(3) sets the user name  to  be  used  in  protocol
19       authentication with the proxy.
20
21       To specify the proxy password use the CURLOPT_PROXYPASSWORD(3).
22
23       The  application  does not have to keep the string around after setting
24       this option.
25

DEFAULT

27       blank
28

PROTOCOLS

30       Most
31

EXAMPLE

33       CURL *curl = curl_easy_init();
34       if(curl) {
35         curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin");
36         curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080");
37         curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "mrsmith");
38         curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "qwerty");
39         ret = curl_easy_perform(curl);
40         curl_easy_cleanup(curl);
41       }
42

AVAILABILITY

44       Added in 7.19.1
45

RETURN VALUE

47       Returns CURLE_OK if the option is  supported,  CURLE_UNKNOWN_OPTION  if
48       not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
49

SEE ALSO

51       CURLOPT_PROXYPASSWORD(3),   CURLOPT_USERNAME(3),   CURLOPT_HTTPAUTH(3),
52       CURLOPT_PROXYAUTH(3)
53
54
55
56libcurl 7.64.0                   May 30, 2017         CURLOPT_PROXYUSERNAME(3)
Impressum