Posted to tcl by mjanssen at Sat Aug 15 12:12:38 GMT 2009view pretty
proc downurl {url {token {}}} { if {$token eq {}} { http::geturl $url -command [list downurl $url] return } if {[http::ncode $token] == 302} { puts "handle redirect to [dict get [http::meta $token] Location] by calling downlurl again" downurl [dict get [http::meta $token] Location] } else { puts "no redirect" parray $token } http::cleanup $token }