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

NAME

6       CURLOPT_HSTSWRITEDATA - pointer passed to the HSTS write callback
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTSWRITEDATA, void *pointer);
12

DESCRIPTION

14       Data  pointer  to  pass to the HSTS write function. If you use the CUR‐
15       LOPT_HSTSWRITEFUNCTION(3) option, this is the pointer you will  get  as
16       input in the 4th argument to the callback.
17
18       This  option does not enable HSTS, you need to use CURLOPT_HSTS_CTRL(3)
19       to do that.
20

DEFAULT

22       NULL
23

PROTOCOLS

25       This feature is only used for HTTP(S) transfer.
26

EXAMPLE

28       CURL *curl = curl_easy_init();
29       struct MyData this;
30       if(curl) {
31         curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
32
33         /* pass pointer that gets passed in to the
34            CURLOPT_HSTSWRITEFUNCTION callback */
35         curl_easy_setopt(curl, CURLOPT_HSTSWRITEDATA, &this);
36
37         curl_easy_perform(curl);
38       }
39

AVAILABILITY

41       Added in 7.74.0
42

RETURN VALUE

44       This will return CURLE_OK.
45

SEE ALSO

47       CURLOPT_HSTSWRITEFUNCTION(3),   CURLOPT_HSTSREADDATA(3),   CURLOPT_HST‐
48       SREADFUNCTION(3),
49
50
51
52libcurl 7.82.0                 November 26, 2021      CURLOPT_HSTSWRITEDATA(3)
Impressum