Sortix main manual
This manual documents Sortix main. You can instead view this document in the latest official manual.
CURLOPT_HSTS(3) | curl_easy_setopt options | CURLOPT_HSTS(3) |
NAME
CURLOPT_HSTS - HSTS cache file nameSYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTS, char *filename);
DESCRIPTION
Make the filename point to a file name to load an existing HSTS cache from, and to store the cache in when the easy handle is closed. Setting a file name with this option will also enable HSTS for this handle (the equivalent of setting CURLHSTS_ENABLE with CURLOPT_HSTS_CTRL(3)).FILE FORMAT
The HSTS cache is saved to and loaded from a text file with one entry per physical line. Each line in the file has the following format:DEFAULT
NULL, no file namePROTOCOLS
HTTPS and HTTPEXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_HSTS, "/home/user/.hsts-cache");
curl_easy_perform(curl);
}
AVAILABILITY
Added in 7.74.0RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.SEE ALSO
CURLOPT_HSTS_CTRL(3), CURLOPT_ALTSVC(3), CURLOPT_RESOLVE(3),May 17, 2022 | libcurl 7.84.0 |