1 # namespace http\Client\Curl
3 The http\Client\Curl namespace holds option value constants specific to the curl driver of the http\Client.
7 ### Features and Versions:
10 Bitmask of available libcurl features.
11 See http\Client\Curl\Features namespace.
13 List of library versions of or linked into libcurl,
14 e.g. "libcurl/7.50.0 OpenSSL/1.0.2h zlib/1.2.8 libidn/1.32 nghttp2/1.12.0".
15 See http\Client\Curl\Versions namespace.
17 ### HTTP Protocol Version
20 Use HTTP/1.0 protocol version.
22 Use HTTP/1.1 protocol version.
24 Attempt to use HTTP/2 protocol version. Available if libcurl is v7.33.0 or more recent and was built with nghttp2 support.
26 Attempt to use version 2 for HTTPS, version 1.1 for HTTP. Available if libcurl is v7.47.0 or more recent and was built with nghttp2 support.
28 Use any HTTP protocol version.
30 ### SSL Protocol Version
33 Use TLS v1.0 encryption.
35 Use TLS v1.1 encryption.
37 Use TLS v1.2 encryption.
39 Use any TLS v1 encryption.
41 Use SSL v2 encryption.
43 Use SSL v3 encryption.
50 Use TLS SRP authentication. Available if libcurl is v7.21.4 or more recent and was built with gnutls or openssl with TLS-SRP support.
61 ### Authentication Type
64 Use Basic authentication.
66 Use Digest authentication.
68 Use IE (lower v7) quirks with Digest authentication. Available if libcurl is v7.19.3 or more recent.
70 Use NTLM authentication.
72 Use GSS-Negotiate authentication.
74 Use HTTP Netgotiate authentication (SPNEGO, RFC4559). Available if libcurl is v7.38.0 or more recent.
76 Use any authentication.
78 ### Proxy Protocol Version
81 Use SOCKSv4 proxy protocol.
83 Use SOCKSv4a proxy protocol.
84 * PROXY_SOCKS5_HOSTNAME
85 Use SOCKS5h proxy protocol.
87 Use SOCKS5 proxy protoccol.
89 Use HTTP/1.1 proxy protocol.
91 Use HTTP/1.0 proxy protocol. Available if libcurl is v7.19.4 or more recent.
93 ### POST Redirection Behavior
96 Keep POSTing on 301 redirects. Available if libcurl is v7.19.1 or more recent.
98 Keep POSTing on 302 redirects. Available if libcurl is v7.19.1 or more recent.
100 Keep POSTing on 303 redirects. Available if libcurl is v7.19.1 or more recent.
102 Keep POSTing on any redirect. Available if libcurl is v7.19.1 or more recent.
107 The option names used here are more or less derived from the corresponding CURLOPT_* names.
111 The HTTP protocol version. See http\Client\Curl\HTTP_VERSION_* constants.
116 The hostname of the proxy.
118 See http\Client\Curl\PROXY_* constants.
120 The port number of the proxy.
124 See http\Client\Curl\AUTH_* constants.
126 Tunnel all operations through the proxy.
128 Comma separated list of hosts where no proxy should be used. Available if libcurl is v7.19.4 or more recent.
130 List of key/value pairs of headers which should only be sent to a proxy. Available if libcurl is v7.37.0 or more recent.
131 * string $proxy_service_name
132 Proxy service name. The default service name is "HTTP" for HTTP based proxies and "rcmd" for SOCKS5. Available if libcurl is v7.43.0 or more recent and has built-in GSSAPI support.
136 * int $dns_cache_timeout
137 Resolved hosts will be kept fot this number of seconds.
139 See http\Client\Curl\IPRESOLVE_* constants.
141 A list of HOST:PORT:ADDRESS mappings which pre-populate the DNS cache. Available if libcurl is v7.21.3 or more recent.
142 * string $dns_servers
143 Comma separated list of custom DNS servers of the form HOST[:PORT]. Available if libcurl is v7.24.0 or more recent and has built-in c-ares support.
144 * string $dns_interface
145 The name of the network interface ***name*** that the DNS resolver should bind to. Available if libcurl is v7.33.0 or more recent and has built-in c-ares support.
146 * string $dns_local_ip4
147 The local IPv4 ***address*** that the resolver should bind to. Available if libcurl is v7.33.0 or more recent and has built-in c-ares support.
148 * string $dns_local_ip6
149 The local IPv6 ***address*** that the resolver should bind to. Available if libcurl is v7.33.0 or more recent and has built-in c-ares support.
153 * int $low_speed_limit
154 Minimum speed in bytes per second.
155 * int $low_speed_time
156 Maximum time in seconds the transfer can be below $low_speed_limit before cancelling.
158 Maximum download size.
160 ### Connection handling
162 * bool $fresh_connect
163 Force a new connection.
165 Force closing the connection.
170 Outgoing interface name.
172 A tuple of min/max ports.
174 Override the URL's port.
176 RFC4007 zone_id. Available if libcurl is v7.19.0 or more recent.
177 * bool $tcp_keepalive
178 Whether to use TCP keepalive. Available if libcurl is v7.25.0 or more recent.
180 Seconds to wait before sending keepalive probes. Available if libcurl is v7.25.0 or more recent.
182 Interval in seconds to wait between sending keepalive probes. Available if libcurl is v7.25.0 or more recent.
184 Disable [Nagle's algotrithm](http://tools.ietf.org/html/rfc896).
185 * string $unix_socket_path
186 Connect to the webserver listening at $unix_socket_path instead of opening a TCP connection to it. Available if libcurl is v7.40.0 or more recent.
188 Do *not* squash sequences of "/../" or "/./" that may exist in the URL's path.
195 See http\Client\Curl\AUTH_* constants.
196 * string $service_name
197 The name of the service for DIGEST-MD5, SPNEGO and KERBEROS5 authentication mechanisms. The default service name is "HTTP". Available if libcurl is v7.43.0 or more recent.
202 How many redirects to follow.
203 * bool $unrestricted_auth
204 Whether to keep sending authentication credentials on redirects to different hosts.
206 See http\Client\Curl\POSTREDIR_* constants. Available if libcurl is v7.19.1 or more recent.
213 Pause this number of seconds between retries.
218 Custom Referer header.
220 Whether to automatically send referers.
222 Custom User-Agent header. Setting this option to NULL will use the default user agent, use the empty string to prevent this header being sent at all.
226 Whether to request compressed content (through Accept-Encoding).
228 Custom If-(Un)Modified since time. If less than zero, the current time will be added.
233 Resume from this byte offset.
235 Fetch specific ranges (if server supports byte ranges).
239 * bool $encodecookies
240 Whether to URLencode cookies.
242 List of custom cookies in the form ["name" => "value"].
243 * bool $cookiesession
244 Ignore previous session cookies to be loaded from $cookiestore.
245 * string $cookiestore
246 Path to a Netscape cookie file, from which cookies will be loaded resp. to which cookies will be written.
251 Seconds the complete transfer may take.
252 * float $connecttimeout
253 Seconds the connect may take.
254 * float $expect_100_timeout
255 Senconds to wait for the server to send a response to "Expect: 100-Continue" before just proceeding with the request. Available if libcurl is v7.36.0 or more recent.
260 Subarray of SSL related options:
262 SSL certificate file.
264 Certificate type (DER, PEM). (Secure Transport additionally supports P12).
268 PK type (PEM, DER, ENG).
270 The password for the private key.
272 Crypto engine to use for the private key.
274 See http\Client\Curl\SSL_VERSION_* constants.
276 Whether to apply peer verification.
278 Whether to apply host verification.
279 * string $cipher_list
280 One or more cipher strings separated by colons.
282 CA bundle to verify the peer with.
284 Directory with prepared CA certs to verify the peer with.
285 * string $random_file
286 A file used to read from to seed the random engine.
288 A Entropy Gathering Daemon socket.
290 CA PEM cert for peer verification. Available if libcurl is v7.19.0 or more recent.
292 File with the concatenation of CRL in PEM format. Available if libcurl was built with OpenSSL support.
294 Enable gathering of SSL certificate chain information. Available if libcurl is v7.19.1 or more recent.
295 * string $pinned_publickey
296 File with a public key to pin. Available if libcurl is v7.39.0 or more recent.
298 TLS_AUTH_* constant. Available if libcurl is v7.21.4 or more recent.
299 * string $tlsauthuser
300 TLS-SRP username. Available if libcurl is v7.21.4 or more recent.
302 TLS-SRP password. Available if libcurl is v7.21.4 or more recent.
304 Enable OCSP. Available if libcurl is v7.41.0 or more recent and was built with OpenSSL, GnuTLS or NSS support.
306 Whether false start should be used during the TLS handshake. Available if libcurl is v7.42.0 or more recent and was built with NSS or SecureTransport support.
311 Size of the connection cache.
312 * int $max_host_connections
313 Maximum number of connections to a single host. Available if libcurl is v7.30.0 or more recent.
314 * int $max_pipeline_length
315 Maximum number of requests in a pipeline. Available if libcurl is v7.30.0 or more recent.
316 * int $max_total_connections
317 Maximum number of simultaneous open connections of this client. Available if libcurl is v7.30.0 or more recent.
319 Whether to enable HTTP/1.1 pipelining.
320 * int $chunk_length_penalty_size
321 Chunk length threshold for pipelining; no more requests on this pipeline if exceeded. Available if libcurl is v7.30.0 or more recent.
322 * int $content_length_penalty_size
323 Size threshold for pipelining; no more requests on this pipeline if exceeded. Available if libcurl is v7.30.0 or more recent.
324 * array $pipelining_server_bl
325 Simple list of server software names to blacklist for pipelining. Available if libcurl is v7.30.0 or more recent.
326 * array $pipelining_site_bl
327 Simple list of server host names to blacklist for pipelining. Available if libcurl is v7.30.0 or more recent.
328 * mixed $use_eventloop
329 Whether to use an event loop. This option accepts either bool, whether to use
330 the internal event loop, or an instance of an http\Client\Curl\User implementation.
331 The internal event loop is only available if pecl/http was built with libevent support.
332 * bool $share_cookies
333 Whether to let the client share cookies between requests.
335 Whether to let the client share SSL/TLS sessions between requests. Available if libcurl is v7.23.0 or more recent.