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