1CURLOPT_ALTSVC(3)          curl_easy_setopt options          CURLOPT_ALTSVC(3)
2
3
4

NAME

6       CURLOPT_ALTSVC - set alt-svc cache file name
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ALTSVC, char *filename);
12

EXPERIMENTAL

14       Warning:  this  feature is early code and is marked as experimental. It
15       can only be enabled by explicitly telling configure with  --enable-alt-
16       svc.  You are advised to not ship this in production before the experi‐
17       mental label is removed.
18

DESCRIPTION

20       Pass in a pointer to a filename to instruct libcurl to use that file as
21       the  Alt-Svc  cache  to  read existing cache contents from and possibly
22       also write it back to a after a transfer,  unless  CURLALTSVC_READONLY‐
23       FILE is set in CURLOPT_ALTSVC_CTRL(3).
24
25       Specify  a blank file name ("") to make libcurl not load from a file at
26       all.
27

DEFAULT

29       NULL. The alt-svc cache is not read nor written to file.
30

PROTOCOLS

32       HTTPS
33

EXAMPLE

35       CURL *curl = curl_easy_init();
36       if(curl) {
37         curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, CURLALTSVC_H1);
38         curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc-cache.txt");
39         curl_easy_perform(curl);
40       }
41

AVAILABILITY

43       Added in 7.64.1
44

RETURN VALUE

46       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
47       if not.
48

SEE ALSO

50       CURLOPT_ALTSVC_CTRL(3), CURLOPT_CONNECT_TO(3), CURLOPT_RESOLVE(3), CUR‐
51       LOPT_COOKIEFILE(3),
52
53
54
55libcurl 7.66.0                  August 14, 2019              CURLOPT_ALTSVC(3)
Impressum