Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
CURLOPT_HSTS(3) | Library Functions Manual | CURLOPT_HSTS(3) |
NAME
CURLOPT_HSTS - HSTS cache filenameSYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTS, char *filename);
DESCRIPTION
Make the filename point to a filename 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 also enables 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:[host] [stamp]
DEFAULT
NULL, no filenamePROTOCOLS
This functionality affects http onlyEXAMPLE
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_HSTS, "/home/user/.hsts-cache");
curl_easy_perform(curl);
}
}
AVAILABILITY
Added in curl 7.74.0RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.SEE ALSO
CURLOPT_ALTSVC(3), CURLOPT_HSTS_CTRL(3), CURLOPT_RESOLVE(3)2024-12-28 | libcurl |