This commit is contained in:
Ingy döt Net 2013-04-10 21:29:02 -07:00
parent 764da6cbbb
commit db842d013d
19005 changed files with 197040 additions and 7 deletions

16
Task/HTTPS/Tcl/https.tcl Normal file
View file

@ -0,0 +1,16 @@
package require http
package require tls
# Tell the http package what to do with https: URLs.
#
# First argument is the protocol name, second the default port, and
# third the connection builder command
http::register "https" 443 ::tls::socket
# Make a secure connection, which is almost identical to normal
# connections except for the different protocol in the URL.
set token [http::geturl "https://sourceforge.net/"]
# Now as for conventional use of the http package
puts [http::data $token]
http::cleanup $token