flush
[mdref/mdref-http] / http / Client / getTransferInfo.md
1 # object http\Client::getTransferInfo(http\Client\Request $request)
2
3 Get transfer related informatioin for a running or finished request.
4
5 ## Params:
6
7 * http\Client\Request $request
8 The request to probe for transfer info.
9
10 ## Returns:
11
12 * object, stdClass instance holding transfer related information.
13
14 ## Throws:
15
16 * http\Exception.
17
18 ## Example:
19
20 The transfer info might look as follows:
21
22 object(stdClass)#6 (36) {
23 ["effective_url"]=>
24 string(16) "https://php.net/"
25 ["response_code"]=>
26 int(302)
27 ["total_time"]=>
28 float(1.011938)
29 ["namelookup_time"]=>
30 float(0.203125)
31 ["connect_time"]=>
32 float(0.387202)
33 ["pretransfer_time"]=>
34 float(0.794423)
35 ["size_upload"]=>
36 float(0)
37 ["size_download"]=>
38 float(272)
39 ["speed_download"]=>
40 float(268)
41 ["speed_upload"]=>
42 float(0)
43 ["header_size"]=>
44 int(197)
45 ["request_size"]=>
46 int(91)
47 ["ssl_verifyresult"]=>
48 int(0)
49 ["filetime"]=>
50 int(-1)
51 ["content_length_download"]=>
52 float(272)
53 ["content_length_upload"]=>
54 float(0)
55 ["starttransfer_time"]=>
56 float(1.011835)
57 ["content_type"]=>
58 string(29) "text/html; charset=iso-8859-1"
59 ["redirect_time"]=>
60 float(0)
61 ["redirect_count"]=>
62 int(0)
63 ["connect_code"]=>
64 int(0)
65 ["httpauth_avail"]=>
66 int(0)
67 ["proxyauth_avail"]=>
68 int(0)
69 ["os_errno"]=>
70 int(0)
71 ["num_connects"]=>
72 int(1)
73 ["ssl_engines"]=>
74 array(3) {
75 [0]=>
76 string(4) "rsax"
77 [1]=>
78 string(6) "rdrand"
79 [2]=>
80 string(7) "dynamic"
81 }
82 ["cookies"]=>
83 array(0) {
84 }
85 ["redirect_url"]=>
86 string(15) "http://php.net/"
87 ["primary_ip"]=>
88 string(11) "72.52.91.14"
89 ["appconnect_time"]=>
90 float(0.794327)
91 ["condition_unmet"]=>
92 int(0)
93 ["primary_port"]=>
94 int(443)
95 ["local_ip"]=>
96 string(13) "192.168.1.120"
97 ["local_port"]=>
98 int(51507)
99 ["certinfo"]=>
100 array(0) {
101 }
102 ["error"]=>
103 string(0) ""
104 }