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

package require http 2
proc httpDownload {url file} {
    set tok [http::geturl $url]
    set fd [open $file w]
    puts -nonewline $fd [http::data $tok]
    close $fd
    http::cleanup $tok
}