GNURLOPT_F...VE_TO_USER(3)

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

✨ NAME ✨

okay so bestie, this is GNURLOPT_F...VE_TO_USER(3) from the curl_easy_setopt options manual, and the option itself is CURLOPT_FTP_ALTERNATIVE_TO_USER β€” the command to use instead of USER with FTP. πŸ¦‹

🌸 SYNOPSIS 🌸

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ALTERNATIVE_TO_USER,
                          char *cmd);

πŸ’… DESCRIPTION πŸ’…

Pass a char * as the parameter, pointing to a string that will be used to authenticate if the usual FTP "USER user" and "PASS password" negotiation fails. 🫢

This is currently only known to be required when connecting to Tumbleweed's Secure Transport FTPS server using client certificates for authentication. No cap, that's the specific situation. πŸ’–

The application does not have to keep the string around after setting this option. So no lifetime stress, bestie. ✨

πŸŽ€ DEFAULT πŸŽ€

NULL β€” that's the default, periodt. πŸ’…

🐟 PROTOCOLS 🐟

FTP only, bestie. 🐟

πŸ”₯ EXAMPLE πŸ”₯

Here's the exact example:

CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");

  curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, "two users");

  ret = curl_easy_perform(curl);

  curl_easy_cleanup(curl);
}

⭐ AVAILABILITY ⭐

Added in 7.15.5. ⭐

πŸ‘‘ 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. So: supported = slay, unknown option = not today, outta heap = 😭. πŸ”₯

🌈 SEE ALSO 🌈


xoxo, this page is from libcurl 7.37.0, dated 19 Jun 2014, and the footer vibe is GNURLOPT_F...VE_TO_USER(3). πŸ’–βœ¨

πŸ“¦ where this page comes from