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 Use HTTP/2 protocol version. Available if libcurl is v7.33.0 or more recent and was built with nghttp2 support.
26 Use any HTTP protocol version.
28 ### SSL Protocol Version
31 Use TLS v1.0 encryption.
33 Use TLS v1.1 encryption.
35 Use TLS v1.2 encryption.
37 Use any TLS v1 encryption.
39 Use SSL v2 encryption.
41 Use SSL v3 encryption.
48 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.
59 ### Authentication Type
62 Use Basic authentication.
64 Use Digest authentication.
66 Use IE (lower v7) quirks with Digest authentication. Available if libcurl is v7.19.3 or more recent.
68 Use NTLM authentication.
70 Use GSS-Negotiate authentication.
72 Use HTTP Netgotiate authentication (SPNEGO, RFC4559). Available if libcurl is v7.38.0 or more recent.
74 Use any authentication.
76 ### Proxy Protocol Version
79 Use SOCKSv4 proxy protocol.
81 Use SOCKSv4a proxy protocol.
82 * PROXY_SOCKS5_HOSTNAME
83 Use SOCKS5h proxy protocol.
85 Use SOCKS5 proxy protoccol.
87 Use HTTP/1.1 proxy protocol.
89 Use HTTP/1.0 proxy protocol. Available if libcurl is v7.19.4 or more recent.
91 ### POST Redirection Behavior
94 Keep POSTing on 301 redirects. Available if libcurl is v7.19.1 or more recent.
96 Keep POSTing on 302 redirects. Available if libcurl is v7.19.1 or more recent.
98 Keep POSTing on 303 redirects. Available if libcurl is v7.19.1 or more recent.
100 Keep POSTing on any redirect. Available if libcurl is v7.19.1 or more recent.
105 The option names used here are more or less derived from the corresponding CURLOPT_* names.
109 The HTTP protocol version. See http\Client\Curl\HTTP_VERSION_* constants.
114 The hostname of the proxy.
116 See http\Client\Curl\PROXY_* constants.
118 The port number of the proxy.
122 See http\Client\Curl\AUTH_* constants.
124 Tunnel all operations through the proxy.
126 Comma separated list of hosts where no proxy should be used. Available if libcurl is v7.19.4 or more recent.
128 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.
129 * string $proxy_service_name
130 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.
134 * int $dns_cache_timeout
135 Resolved hosts will be kept fot this number of seconds.
137 See http\Client\Curl\IPRESOLVE_* constants.
139 A list of HOST:PORT:ADDRESS mappings which pre-populate the DNS cache. Available if libcurl is v7.21.3 or more recent.
140 * string $dns_servers
141 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.
142 * string $dns_interface
143 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.
144 * string $dns_local_ip4
145 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.
146 * string $dns_local_ip6
147 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.
151 * int $low_speed_limit
152 Minimum speed in bytes per second.
153 * int $low_speed_time
154 Maximum time in seconds the transfer can be below $low_speed_limit before cancelling.
156 Maximum download size.
158 ### Connection handling
160 * bool $fresh_connect
161 Force a new connection.
163 Force closing the connection.
168 Outgoing interface name.
170 A tuple of min/max ports.
172 Override the URL's port.
174 RFC4007 zone_id. Available if libcurl is v7.19.0 or more recent.
175 * bool $tcp_keepalive
176 Whether to use TCP keepalive. Available if libcurl is v7.25.0 or more recent.
178 Seconds to wait before sending keepalive probes. Available if libcurl is v7.25.0 or more recent.
180 Interval in seconds to wait between sending keepalive probes. Available if libcurl is v7.25.0 or more recent.
182 Disable [Nagle's algotrithm](http://tools.ietf.org/html/rfc896).
183 * string $unix_socket_path
184 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.
186 Do *not* squash sequences of "/../" or "/./" that may exist in the URL's path.
193 See http\Client\Curl\AUTH_* constants.
194 * string $service_name
195 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.
200 How many redirects to follow.
201 * bool $unrestricted_auth
202 Whether to keep sending authentication credentials on redirects to different hosts.
204 See http\Client\Curl\POSTREDIR_* constants. Available if libcurl is v7.19.1 or more recent.
211 Pause this number of seconds between retries.
216 Custom Referer header.
218 Whether to automatically send referers.
220 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.
224 Whether to request compressed content (through Accept-Encoding).
226 Custom If-(Un)Modified since time. If less than zero, the current time will be added.
231 Resume from this byte offset.
233 Fetch specific ranges (if server supports byte ranges).
237 * bool $encodecookies
238 Whether to URLencode cookies.
240 List of custom cookies in the form ["name" => "value"].
241 * bool $cookiesession
242 Ignore previous session cookies to be loaded from $cookiestore.
243 * string $cookiestore
244 Path to a Netscape cookie file, from which cookies will be loaded resp. to which cookies will be written.
249 Seconds the complete transfer may take.
250 * float $connecttimeout
251 Seconds the connect may take.
252 * float $expect_100_timeout
253 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.
258 Subarray of SSL related options:
260 SSL certificate file.
262 Certificate type (DER, PEM). (Secure Transport additionally supports P12).
266 PK type (PEM, DER, ENG).
268 The password for the private key.
270 Crypto engine to use for the private key.
272 See http\Client\Curl\SSL_VERSION_* constants.
274 Whether to apply peer verification.
276 Whether to apply host verification.
277 * string $cipher_list
278 One or more cipher strings separated by colons.
280 CA bundle to verify the peer with.
282 Directory with prepared CA certs to verify the peer with.
283 * string $random_file
284 A file used to read from to seed the random engine.
286 A Entropy Gathering Daemon socket.
288 CA PEM cert for peer verification. Available if libcurl is v7.19.0 or more recent.
290 File with the concatenation of CRL in PEM format. Available if libcurl was built with OpenSSL support.
292 Enable gathering of SSL certificate chain information. Available if libcurl is v7.19.1 or more recent.
293 * string $pinned_publickey
294 File with a public key to pin. Available if libcurl is v7.39.0 or more recent.
296 TLS_AUTH_* constant. Available if libcurl is v7.21.4 or more recent.
297 * string $tlsauthuser
298 TLS-SRP username. Available if libcurl is v7.21.4 or more recent.
300 TLS-SRP password. Available if libcurl is v7.21.4 or more recent.
302 Enable OCSP. Available if libcurl is v7.41.0 or more recent and was built with OpenSSL, GnuTLS or NSS support.
304 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.
309 Size of the connection cache.
310 * int $max_host_connections
311 Maximum number of connections to a single host. Available if libcurl is v7.30.0 or more recent.
312 * int $max_pipeline_length
313 Maximum number of requests in a pipeline. Available if libcurl is v7.30.0 or more recent.
314 * int $max_total_connections
315 Maximum number of simultaneous open connections of this client. Available if libcurl is v7.30.0 or more recent.
317 Whether to enable HTTP/1.1 pipelining.
318 * int $chunk_length_penalty_size
319 Chunk length threshold for pipelining; no more requests on this pipeline if exceeded. Available if libcurl is v7.30.0 or more recent.
320 * int $content_length_penalty_size
321 Size threshold for pipelining; no more requests on this pipeline if exceeded. Available if libcurl is v7.30.0 or more recent.
322 * array $pipelining_server_bl
323 Simple list of server software names to blacklist for pipelining. Available if libcurl is v7.30.0 or more recent.
324 * array $pipelining_site_bl
325 Simple list of server host names to blacklist for pipelining. Available if libcurl is v7.30.0 or more recent.
326 * mixed $use_eventloop
327 Whether to use an event loop. This option accepts either bool, whether to use
328 the internal event loop, or an instance of an http\Client\Curl\User implementation.
329 The internal event loop is only available if pecl/http was built with libevent support.
330 * bool $share_cookies
331 Whether to let the client share cookies between requests.
333 Whether to let the client share SSL/TLS sessions between requests. Available if libcurl is v7.23.0 or more recent.