Posted to tcl by kbk at Thu Jun 11 14:16:10 GMT 2009view pretty

package require http
http::config -proxyhost 127.0.0.1 -proxyport 8080
proc onFetchedURL {token} {
    puts "Status: [http::status $token]"
    puts "Data: [http::data $token]"
    set ::finished 1
    http::cleanup $token
}
http::geturl http://www.google.com/ -command onFetchedURL
# run the event loop for a while
vwait finished