]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - tests/getInfo.tcl
Imported Upstream version 7.19.6
[sven/tclcurl.git] / tests / getInfo.tcl
1 package require TclCurl
2
3 set curlHandle [curl::init]
4 $curlHandle configure -url "127.0.0.1" -filetime 1  -verbose 1             \
5          -cookielist "127.0.0.1\tFALSE\t/\tFALSE\t1262307600\tad_browser_id\t  18864635"
6 $curlHandle perform
7
8 puts "Url: [$curlHandle getinfo effectiveurl]"
9 puts "Primary IP: [$curlHandle getinfo primaryip]"
10 puts "Redirect url: [$curlHandle getinfo redirecturl]"
11 puts "Http-code: [$curlHandle getinfo responsecode]"
12 puts "Proxy response code: [$curlHandle getinfo httpconnectcode]"
13 set fileTime [$curlHandle getinfo filetime]
14 puts "Filetime: $fileTime - [clock format $fileTime]"
15 puts "Total time: [$curlHandle getinfo totaltime]"
16 puts "Name lookup time: [$curlHandle getinfo namelookuptime]"
17 puts "Name connect time: [$curlHandle getinfo connecttime]"
18 puts "Name pretransfer time: [$curlHandle getinfo pretransfertime]"
19 puts "Name start transfer time: [$curlHandle getinfo starttransfertime]"
20 puts "Name app connect time: [$curlHandle getinfo appconnecttime]"
21 puts "Name size upload: [$curlHandle getinfo sizeupload]"
22 puts "Name size download: [$curlHandle getinfo sizedownload]"
23 puts "Name speed download: [$curlHandle getinfo speeddownload]"
24 puts "Name speed upload: [$curlHandle getinfo speedupload]"
25 puts "Name header size: [$curlHandle getinfo headersize]"
26 puts "Name request size: [$curlHandle getinfo requestsize]"
27 puts "Name ssl verifyresult: [$curlHandle getinfo sslverifyresult]"
28 puts "SSL engines: [$curlHandle getinfo sslengines]"
29 puts "Name length download: [$curlHandle getinfo contentlengthdownload]"
30 puts "Name length upload: [$curlHandle getinfo contentlengthupload]"
31 puts "Content-Type: [$curlHandle getinfo contenttype]"
32 puts "Redirect time: [$curlHandle getinfo redirecttime]"
33 puts "Redirect count: [$curlHandle getinfo redirectcount]"
34 puts "Authentication methods available: [$curlHandle getinfo httpauthavail]"
35 puts "Authentication methods at the proxy: [$curlHandle getinfo proxyauthavail]"
36 puts "Operating System error number: [$curlHandle getinfo oserrno]"
37 puts "Number of successful connects: [$curlHandle getinfo numconnects]"
38 puts "Known cookies: [$curlHandle getinfo cookielist]"
39 set certList [$curlHandle getinfo certinfo]
40 set certNum  [lindex $certList 0]
41 puts "NÂș de certificados: $certNum"
42 for {set i 1} {$i<=$certNum} {incr i} {
43     puts [lindex $certList $i]
44 }
45
46 $curlHandle cleanup
47
48
49
50
51
52