]> git.sven.stormbind.net Git - sven/tclcurl.git/blobdiff - tests/https.tcl
Imported Upstream version 7.19.6
[sven/tclcurl.git] / tests / https.tcl
diff --git a/tests/https.tcl b/tests/https.tcl
new file mode 100755 (executable)
index 0000000..c9e85d4
--- /dev/null
@@ -0,0 +1,13 @@
+package require TclCurl
+
+if {$tcl_platform(platform)=="windows"} {
+    set certFile [file join $env(windir) curl-ca-bundle.crt]
+} else {
+    set certFile /usr/local/share/curl/curl-ca-bundle.crt
+}
+
+::curl::transfer -url https://www.paypal.com/ -cainfo $certFile \
+        -file paypal.html
+
+
+puts "https://www.paypal.com/ saved in 'paypal.html'"