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