GNURLOPT_SERVICE_NAME(3)
π NAME π
okay so this is the GNURLOPT_SERVICE_NAME(3) page from the curl_easy_setopt options manual, bestie, and the main character is literally CURLOPT_SERVICE_NAME β the authentication service name. π
β¨ SYNOPSIS β¨
Here's the exact spell, no cap:
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SERVICE_NAME, char
*name);
π DESCRIPTION π
You pass a char * as the parameter, pointing at a string that holds the service name for DIGEST-MD5, SPNEGO and Kerberos 5 authentication mechanisms. The default service names are "ftp", "HTTP", "imap", "pop" and "smtp", and this option is your permission slip to change them. π«
The app does not have to keep the string around after setting this option. Set it and move on, icon. π«Ά
πΈ DEFAULT πΈ
The default is literally See above. No extra lore. β¨
π¦ PROTOCOLS π¦
HTTP, FTP, IMAP, POP and SMTP. That's the whole guest list. π
π EXAMPLE π
CURL *curl = curl_easy_init();
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SERVICE_NAME, "custom");
ret = curl_easy_perform(curl);
}
π₯ AVAILABILITY π₯
Added in 7.43.0 for HTTP, and in 7.49.0 for FTP, IMAP, POP3 and SMTP. Yes, POP3 here and POP up in protocols β that's what the page says, bestie, don't come for me. π
π RETURN VALUE π
CURLE_OKif the option is supportedCURLE_UNKNOWN_OPTIONif notCURLE_OUT_OF_MEMORYif there was insufficient heap space
π SEE ALSO π
xoxo, your curl bestie π β this page is from libcurl 7.43.0, dated 17 Jun 2015, and it's the GNURLOPT_SERVICE_NAME(3) manual page. periodt. π«Ά
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms