From 077fd6aac846016af0026bf67ad5b6cfe5620e5a Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Thu, 31 Jul 2025 15:13:49 +0200 Subject: [PATCH] curl_easy_ssls_export: make the example more clear As mentioned in #18031 Closes #18117 --- docs/libcurl/curl_easy_ssls_export.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/libcurl/curl_easy_ssls_export.md b/docs/libcurl/curl_easy_ssls_export.md index 0bfa3da635..32f2fff240 100644 --- a/docs/libcurl/curl_easy_ssls_export.md +++ b/docs/libcurl/curl_easy_ssls_export.md @@ -150,6 +150,12 @@ int main(void) if(curl) { curl_easy_setopt(curl, CURLOPT_SHARE, share); + /* run a transfer, all TLS sessions received will be added + * to the share. */ + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_perform(curl); + + /* export the TLS sessions collected in the share */ rc = curl_easy_ssls_export(curl, my_export_cb, NULL); /* always cleanup */