1--- 2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_SERVICE_NAME 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_PROXY (3) 9 - CURLOPT_PROXYTYPE (3) 10 - CURLOPT_PROXY_SERVICE_NAME (3) 11--- 12 13# NAME 14 15CURLOPT_SERVICE_NAME - authentication service name 16 17# SYNOPSIS 18 19~~~c 20#include <curl/curl.h> 21 22CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SERVICE_NAME, char *name); 23~~~ 24 25# DESCRIPTION 26 27Pass a char pointer as parameter to a string holding the *name* of the service 28for DIGEST-MD5, SPNEGO and Kerberos 5 authentication mechanisms. The default 29service names are "ftp", "HTTP", "imap", "ldap", "pop" and "smtp". This option 30allows you to change them. 31 32The application does not have to keep the string around after setting this 33option. 34 35# DEFAULT 36 37See above 38 39# PROTOCOLS 40 41HTTP, FTP, IMAP, LDAP, POP3 and SMTP 42 43# EXAMPLE 44 45~~~c 46int main(void) 47{ 48 CURL *curl = curl_easy_init(); 49 if(curl) { 50 CURLcode ret; 51 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 52 curl_easy_setopt(curl, CURLOPT_SERVICE_NAME, "custom"); 53 ret = curl_easy_perform(curl); 54 } 55} 56~~~ 57 58# AVAILABILITY 59 60Added in 7.43.0 for HTTP, 7.49.0 for FTP, IMAP, POP3 and SMTP, 617.82.0 for OpenLDAP. 62 63# RETURN VALUE 64 65Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or 66CURLE_OUT_OF_MEMORY if there was insufficient heap space. 67