mdref.json config
[mdref/mdref-http] / http / Client / getAvailableOptions.md
1 # array http\Client::getAvailableOptions()
2
3 Retrieve a list of available request options and their default values.
4
5 See f.e. the [request options for the Curl driver](http/Client/Curl#Options:).
6
7 ## Params:
8
9 None.
10
11 ## Returns:
12
13 * array, list of key/value pairs of available request options and their default values.
14
15 ## Throws:
16
17 * http\Exception\InvalidArgumentException
18
19 ## Example:
20
21 <?php
22
23 $client = new http\Client("curl");
24 var_dump($client->getAvailableOptions());
25
26 ?>
27
28 Yields:
29
30 array(49) {
31 ["proxyhost"]=>
32 NULL
33 ["proxytype"]=>
34 int(0)
35 ["proxyport"]=>
36 int(0)
37 ["proxyauth"]=>
38 NULL
39 ["proxyauthtype"]=>
40 int(-18)
41 ["proxytunnel"]=>
42 bool(false)
43 ["noproxy"]=>
44 NULL
45 ["proxyheader"]=>
46 NULL
47 ["unix_socket_path"]=>
48 NULL
49 ["dns_cache_timeout"]=>
50 int(60)
51 ["ipresolve"]=>
52 int(0)
53 ["resolve"]=>
54 NULL
55 ["low_speed_limit"]=>
56 int(0)
57 ["low_speed_time"]=>
58 int(0)
59 ["fresh_connect"]=>
60 bool(false)
61 ["forbid_reuse"]=>
62 bool(false)
63 ["interface"]=>
64 NULL
65 ["portrange"]=>
66 NULL
67 ["port"]=>
68 int(0)
69 ["address_scope"]=>
70 int(0)
71 ["httpauth"]=>
72 NULL
73 ["httpauthtype"]=>
74 int(-18)
75 ["redirect"]=>
76 int(0)
77 ["unrestricted_auth"]=>
78 bool(false)
79 ["postredir"]=>
80 int(0)
81 ["retrycount"]=>
82 int(0)
83 ["retrydelay"]=>
84 float(0)
85 ["referer"]=>
86 NULL
87 ["autoreferer"]=>
88 bool(true)
89 ["useragent"]=>
90 string(51) "PECL_HTTP/2.3.0dev PHP/5.6.6-dev libcurl/7.41.0-DEV"
91 ["resume"]=>
92 int(0)
93 ["range"]=>
94 NULL
95 ["etag"]=>
96 NULL
97 ["compress"]=>
98 bool(false)
99 ["lastmodified"]=>
100 int(0)
101 ["encodecookies"]=>
102 bool(true)
103 ["cookies"]=>
104 NULL
105 ["cookiesession"]=>
106 bool(false)
107 ["cookiestore"]=>
108 NULL
109 ["maxfilesize"]=>
110 int(0)
111 ["protocol"]=>
112 int(0)
113 ["timeout"]=>
114 float(0)
115 ["connecttimeout"]=>
116 float(3)
117 ["expect_100_timeout"]=>
118 float(1)
119 ["tcp_nodelay"]=>
120 bool(false)
121 ["tcp_keepalive"]=>
122 bool(false)
123 ["tcp_keepidle"]=>
124 int(60)
125 ["tcp_keepintvl"]=>
126 int(60)
127 ["ssl"]=>
128 array(24) {
129 ["cert"]=>
130 NULL
131 ["certtype"]=>
132 string(3) "PEM"
133 ["key"]=>
134 NULL
135 ["keytype"]=>
136 string(3) "PEM"
137 ["keypasswd"]=>
138 NULL
139 ["engine"]=>
140 NULL
141 ["version"]=>
142 int(0)
143 ["verifypeer"]=>
144 bool(true)
145 ["verifyhost"]=>
146 bool(true)
147 ["verifystatus"]=>
148 bool(false)
149 ["cipher_list"]=>
150 NULL
151 ["cainfo"]=>
152 string(34) "/etc/ssl/certs/ca-certificates.crt"
153 ["capath"]=>
154 NULL
155 ["random_file"]=>
156 NULL
157 ["egdsocket"]=>
158 NULL
159 ["issuercert"]=>
160 NULL
161 ["crlfile"]=>
162 NULL
163 ["certinfo"]=>
164 bool(false)
165 ["enable_npn"]=>
166 bool(true)
167 ["enable_alpn"]=>
168 bool(true)
169 ["pinned_publickey"]=>
170 NULL
171 ["tlsauthtype"]=>
172 int(0)
173 ["tlsauthuser"]=>
174 NULL
175 ["tlsauthpass"]=>
176 NULL
177 }
178 }
179