CURLOPT_SERVICE_NAME.3 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. .\" generated by cd2nroff 0.1 from CURLOPT_SERVICE_NAME.md
  2. .TH CURLOPT_SERVICE_NAME 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_SERVICE_NAME \- authentication service name
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SERVICE_NAME, char *name);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a char pointer as parameter to a string holding the \fIname\fP of the service
  12. for DIGEST\-MD5, SPNEGO and Kerberos 5 authentication mechanisms. The default
  13. service names are "ftp", "HTTP", "imap", "ldap", "pop" and "smtp". This option
  14. allows you to change them.
  15. The application does not have to keep the string around after setting this
  16. option.
  17. .SH DEFAULT
  18. See above
  19. .SH PROTOCOLS
  20. This functionality affects ftp, http, imap, ldap, pop3 and smtp
  21. .SH EXAMPLE
  22. .nf
  23. int main(void)
  24. {
  25. CURL *curl = curl_easy_init();
  26. if(curl) {
  27. CURLcode ret;
  28. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  29. curl_easy_setopt(curl, CURLOPT_SERVICE_NAME, "custom");
  30. ret = curl_easy_perform(curl);
  31. }
  32. }
  33. .fi
  34. .SH AVAILABILITY
  35. Added in curl 7.43.0
  36. .SH RETURN VALUE
  37. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  38. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  39. .SH SEE ALSO
  40. .BR CURLOPT_PROXY (3),
  41. .BR CURLOPT_PROXYTYPE (3),
  42. .BR CURLOPT_PROXY_SERVICE_NAME (3)