Posted to tcl by evilotto at Fri Sep 28 23:00:51 GMT 2018view raw

  1. package require http 2
  2. proc httpDownload {url file} {
  3. set tok [http::geturl $url]
  4. set fd [open $file w]
  5. puts -nonewline $fd [http::data $tok]
  6. close $fd
  7. http::cleanup $tok
  8. }
  9.