1CURLOPT_HSTSWRITEDATA(3) curl_easy_setopt options CURLOPT_HSTSWRITEDATA(3)
2
3
4
6 CURLOPT_HSTSWRITEDATA - pointer passed to the HSTS write callback
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTSWRITEDATA, void
12 *pointer);
13
15 Warning: this feature is early code and is marked as experimental. It
16 can only be enabled by explicitly telling configure with --enable-hsts.
17 You are advised to not ship this in production before the experimental
18 label is removed.
19
21 Data pointer to pass to the HSTS write function. If you use the CUR‐
22 LOPT_HSTSWRITEFUNCTION(3) option, this is the pointer you'll get as in‐
23 put in the 4th argument to the callback.
24
25 This option doesn't enable HSTS, you need to use CURLOPT_HSTS_CTRL(3)
26 to do that.
27
29 NULL
30
32 This feature is only used for HTTP(S) transfer.
33
35 CURL *curl = curl_easy_init();
36 struct MyData this;
37 if(curl) {
38 curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
39
40 /* pass pointer that gets passed in to the
41 CURLOPT_HSTSWRITEFUNCTION callback */
42 curl_easy_setopt(curl, CURLOPT_HSTSWRITEDATA, &this);
43
44 curl_easy_perform(curl);
45 }
46
48 Added in 7.74.0
49
51 This will return CURLE_OK.
52
54 CURLOPT_HSTSWRITEFUNCTION(3), CURLOPT_HSTSREADDATA(3), CURLOPT_HST‐
55 SREADFUNCTION(3),
56
57
58
59libcurl 7.76.1 November 04, 2020 CURLOPT_HSTSWRITEDATA(3)