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
12       *pointer);
13

DESCRIPTION

15       Data pointer to pass to the HSTS write function. If you  use  the  CUR‐
16       LOPT_HSTSWRITEFUNCTION(3) option, this is the pointer you'll get as in‐
17       put in the 4th argument to the callback.
18
19       This option doesn't enable HSTS, you need to  use  CURLOPT_HSTS_CTRL(3)
20       to do that.
21

DEFAULT

23       NULL
24

PROTOCOLS

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

EXAMPLE

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

AVAILABILITY

42       Added in 7.74.0
43

RETURN VALUE

45       This will return CURLE_OK.
46

SEE ALSO

48       CURLOPT_HSTSWRITEFUNCTION(3),   CURLOPT_HSTSREADDATA(3),   CURLOPT_HST‐
49       SREADFUNCTION(3),
50
51
52
53libcurl 7.79.1                September 06, 2021      CURLOPT_HSTSWRITEDATA(3)
Impressum