easy:SetOpt_HSTSWriteFunction(hstswrite[, userdata])
The callback function receives two parameters. If you pass the optional userdata
argument, the value you pass in userdata will be passed to your callback function as
a third parameter. The userdata parameter can be of any type.
The callback function looks like this:
res = hstswrite(sts, count[, userdata]) |
The first two parameters are tables. The sts table contains the following fields:
NameIncludeSubDomainsExpireYYYYMMDD HH:MM:SS.
The count table contains the following fields:
IndexTotal
The callback should return #CURLSTS_OK if it succeeded and is prepared to
be called again (for another host) or #CURLSTS_DONE if there's nothing
more to do. It can also return #CURLSTS_FAIL to signal error.
This option does not enable HSTS, you need to use #CURLOPT_HSTS_CTRL to
do that.