1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_PROXYPASSWORD
5Section: 3
6Source: libcurl
7See-also:
8  - CURLOPT_HTTPAUTH (3)
9  - CURLOPT_PASSWORD (3)
10  - CURLOPT_PROXYAUTH (3)
11  - CURLOPT_PROXYUSERNAME (3)
12Protocol:
13  - All
14---
15
16# NAME
17
18CURLOPT_PROXYPASSWORD - password to use with proxy authentication
19
20# SYNOPSIS
21
22~~~c
23#include <curl/curl.h>
24
25CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPASSWORD, char *pwd);
26~~~
27
28# DESCRIPTION
29
30Pass a char pointer as parameter, which should be pointing to the null-terminated
31password to use for authentication with the proxy.
32
33The CURLOPT_PROXYPASSWORD(3) option should be used in conjunction with
34the CURLOPT_PROXYUSERNAME(3) option.
35
36The application does not have to keep the string around after setting this
37option.
38
39# DEFAULT
40
41blank
42
43# EXAMPLE
44
45~~~c
46int main(void)
47{
48  CURL *curl = curl_easy_init();
49  if(curl) {
50    CURLcode res;
51    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
52    curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080");
53    curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "mrsmith");
54    curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "qwerty");
55    res = curl_easy_perform(curl);
56    curl_easy_cleanup(curl);
57  }
58}
59~~~
60
61# AVAILABILITY
62
63Added in 7.19.1
64
65# RETURN VALUE
66
67Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
68CURLE_OUT_OF_MEMORY if there was insufficient heap space.
69