Posted to tcl by evilotto at Thu Jun 26 01:24:26 GMT 2014view pretty
package require http 2 namespace eval myNs { proc onData {tok} { puts "callback with $tok" set state [array get $tok] puts "status: [dict get $state status]" puts "body: [dict get $state body]" http::cleanup $tok set ::forever 1 } http::geturl http://www.example.com/ -command [namespace which onData] } vwait forever