shaniqua-tclcurl-fa/tests/failOnError.tcl

18 lines
355 B
Tcl
Raw Permalink Normal View History

2014-02-05 16:43:59 -08:00
package require TclCurl
set curlHandle [curl::init]
$curlHandle configure -url "127.0.0.1/cosa.html"
$curlHandle configure -failonerror 0 ; # This is the default
puts "With failonerror==0:"
catch {$curlHandle perform}
puts "\n\n\n\n\n"
puts "With failonerror==1:"
$curlHandle configure -failonerror 1
catch {$curlHandle perform}
$curlHandle cleanup