]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - tests/getInfo.tcl
releasing package tclcurl version 7.22.0+hg20160822-2
[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 "Primary port: [$curlHandle getinfo primaryport]"
11 puts "Local IP: [$curlHandle getinfo localip]"
12 puts "Local port: [$curlHandle getinfo localport]"
13 puts "Redirect url: [$curlHandle getinfo redirecturl]"
14 puts "Http-code: [$curlHandle getinfo responsecode]"
15 puts "Proxy response code: [$curlHandle getinfo httpconnectcode]"
16 set fileTime [$curlHandle getinfo filetime]
17 puts "Filetime: $fileTime - [clock format $fileTime]"
18 puts "Total time: [$curlHandle getinfo totaltime]"
19 puts "Name lookup time: [$curlHandle getinfo namelookuptime]"
20 puts "Name connect time: [$curlHandle getinfo connecttime]"
21 puts "Name pretransfer time: [$curlHandle getinfo pretransfertime]"
22 puts "Name start transfer time: [$curlHandle getinfo starttransfertime]"
23 puts "Name app connect time: [$curlHandle getinfo appconnecttime]"
24 puts "Name size upload: [$curlHandle getinfo sizeupload]"
25 puts "Name size download: [$curlHandle getinfo sizedownload]"
26 puts "Name speed download: [$curlHandle getinfo speeddownload]"
27 puts "Name speed upload: [$curlHandle getinfo speedupload]"
28 puts "Name header size: [$curlHandle getinfo headersize]"
29 puts "Name request size: [$curlHandle getinfo requestsize]"
30 puts "Name ssl verifyresult: [$curlHandle getinfo sslverifyresult]"
31 puts "SSL engines: [$curlHandle getinfo sslengines]"
32 puts "Name length download: [$curlHandle getinfo contentlengthdownload]"
33 puts "Name length upload: [$curlHandle getinfo contentlengthupload]"
34 puts "Content-Type: [$curlHandle getinfo contenttype]"
35 puts "Redirect time: [$curlHandle getinfo redirecttime]"
36 puts "Redirect count: [$curlHandle getinfo redirectcount]"
37 puts "Authentication methods available: [$curlHandle getinfo httpauthavail]"
38 puts "Authentication methods at the proxy: [$curlHandle getinfo proxyauthavail]"
39 puts "Operating System error number: [$curlHandle getinfo oserrno]"
40 puts "Number of successful connects: [$curlHandle getinfo numconnects]"
41 puts "Known cookies: [$curlHandle getinfo cookielist]"
42 set certList [$curlHandle getinfo certinfo]
43 set certNum  [lindex $certList 0]
44 puts "NÂș de certificados: $certNum"
45 for {set i 1} {$i<=$certNum} {incr i} {
46     puts [lindex $certList $i]
47 }
48
49 $curlHandle cleanup
50
51
52
53
54
55