CURLOPT_HSTSWRITEDATA(3)
π CURLOPT_HSTSWRITEDATA(3) π
okay so bestie, welcome to the CURLOPT_HSTSWRITEDATA page from the libcurl Library Functions Manual β¨ this one is short, sweet, and extremely βpass the pointer, bestieβ energy.
πΈ NAME πΈ
CURLOPT_HSTSWRITEDATA β pointer passed to the HSTS write callback π«
π¦ SYNOPSIS π¦
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTSWRITEDATA, void *pointer);
π DESCRIPTION π
Itβs the data pointer to pass to the HSTS write function, bestie. If youβre using the CURLOPT_HSTSWRITEFUNCTION(3) option, this is literally the pointer you get as input in the fourth argument to the callback π«Ά
β οΈ ok important: this option does not enable HSTS. You need to use CURLOPT_HSTS_CTRL(3) to do that. no cap, donβt forget it π
π DEFAULT π
NULLβ thatβs the whole default, bestie π³οΈ
π PROTOCOLS π
- This functionality affects
httponly π¦
β¨ EXAMPLE β¨
struct MyData {
void *custom;
};
int main(void)
{
CURL *curl = curl_easy_init();
struct MyData this;
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* pass pointer that gets passed in to the
CURLOPT_HSTSWRITEFUNCTION callback */
curl_easy_setopt(curl, CURLOPT_HSTSWRITEDATA, &this);
curl_easy_perform(curl);
}
}
π₯ AVAILABILITY π₯
- Added in curl
7.74.0π
π RETURN VALUE π
- This returns
CURLE_OKπ thatβs it, thatβs the vibe.
π«Ά SEE ALSO π«Ά
later, bestie π«Ά β this page came from libcurl and is dated 2026-10-12. mwah π
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms