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

NAME

6       CURLOPT_ALTSVC - 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

DESCRIPTION

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

DEFAULT

23       NULL. The alt-svc cache is not read nor written to file.
24

PROTOCOLS

26       HTTPS
27

EXAMPLE

29       CURL *curl = curl_easy_init();
30       if(curl) {
31         curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, CURLALTSVC_H1);
32         curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc-cache.txt");
33         curl_easy_perform(curl);
34       }
35

AVAILABILITY

37       Added in 7.64.1
38

RETURN VALUE

40       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
41       if not.
42

SEE ALSO

44       CURLOPT_ALTSVC_CTRL(3), CURLOPT_CONNECT_TO(3), CURLOPT_RESOLVE(3), CUR‐
45       LOPT_COOKIEFILE(3),
46
47
48
49libcurl 7.79.1                September 08, 2021             CURLOPT_ALTSVC(3)
Impressum