]> git.sven.stormbind.net Git - sven/tclcurl.git/blobdiff - tests/ntlm.tcl
Imported Upstream version 7.19.6
[sven/tclcurl.git] / tests / ntlm.tcl
diff --git a/tests/ntlm.tcl b/tests/ntlm.tcl
new file mode 100755 (executable)
index 0000000..22eee78
--- /dev/null
@@ -0,0 +1,16 @@
+# Contributed by Jos Decoster
+
+set curlHandle [curl::init]
+
+$curlHandle configure                                        \
+        -verbose 1 -failonerror 1 -errorbuffer ::errorBuffer \
+        -url $::url -file $::file                            \
+        -proxy $::proxy_host -proxyport $::proxy_port        \
+        -proxyauth ntlm                                      \
+        -proxyuserpwd $::proxy_user:$::proxy_password
+
+if { [catch {$curlHandle perform} r] } {
+    return -code error "$r $::errorBuffer"
+}
+
+$curlHandle cleanup