Here is some legacy code I copied from long ago. The command url is supposed to print off the contents of a web page.
proc url {String} {
package require http
package require tls
::http::register https 443 [list ::tls::socket -request 1 -ssl2 0 -ssl3 0 -tls1 1 -cafile VeriSignClass3SecureServerCA-G3.crt]
set token [::http::geturl $String]
upvar #0 $token state
puts [$state(body)] }
I try url “https://shenlanguage.org/TBoS/Programs/3.3.txt” and get this
invalid command name “(define factorial …. “
So the web page is being downloaded but treated as a command? What’s wrong here?
I hoped to print the contents off the page.