]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_easy_ssls_export: make the example more clear
authorStefan Eissing <stefan@eissing.org>
Thu, 31 Jul 2025 13:13:49 +0000 (15:13 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 1 Aug 2025 08:49:56 +0000 (10:49 +0200)
As mentioned in #18031
Closes #18117

docs/libcurl/curl_easy_ssls_export.md

index 0bfa3da6352e01cd9f781daa161aac8cc3ea0742..32f2fff240b13385acd83f7b74b2e78991febdd8 100644 (file)
@@ -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 */