GNURLOPT_PROXYPASSWORD(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

πŸ’… GNURLOPT_PROXYPASSWORD πŸ’…

okay so bestie, this page is from the curl_easy_setopt options manual, and it's all about GNURLOPT_PROXYPASSWORD(3). we're literally about to make proxy password setup make sense. πŸ’–


🌸 NAME 🌸

CURLOPT_PROXYPASSWORD β€” password to use with proxy authentication πŸ’…

✨ SYNOPSIS ✨

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPASSWORD, char
       *pwd);

πŸ¦‹ DESCRIPTION πŸ¦‹

Pass a char * as parameter, and it should be pointing to the null-terminated password to use for authentication with the proxy. fr fr, that's the whole job.

The CURLOPT_PROXYPASSWORD(3) option should be used in conjunction with the CURLOPT_PROXYUSERNAME(3) option β€” they're a matching set, iykyk. 🫢

The application does not have to keep the string around after setting this option. lowkey convenient, right? 😌

πŸŽ€ DEFAULT πŸŽ€

blank β€” literally no default password, bestie. πŸ’€

🌈 PROTOCOLS 🌈

Most β€” not all, but most. that's the vibe. ✨

πŸ“ EXAMPLE πŸ“

Here's the whole example, verbatim, no cap:

CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin");
  curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080");
  curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "mrsmith");
  curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "qwerty");
  ret = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
}

πŸ”₯ AVAILABILITY πŸ”₯

Added in 7.19.1 β€” iconic since way back. πŸ‘‘

⭐ RETURN VALUE ⭐

Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. that's it, that's the tea. 🍡

πŸ’œ SEE ALSO πŸ’œ

go read these too, bestie:


πŸ’– cute sign-off: this page is from libcurl 7.37.0, dated 19 Jun 2014, and it's the GNURLOPT_PROXYPASSWORD(3) page. periodt. πŸ’…

πŸ“¦ where this page comes from