mdref.json config
[mdref/mdref-http] / http / Client / __construct.md
1 # void http\Client::__construct([string $driver = NULL[, string $persistent_handle_id = NULL]])
2
3 Create a new HTTP client.
4
5 Currently only "curl" is supported as a $driver, and used by default.
6 Persisted resources identified by $persistent_handle_id will be re-used if available.
7
8 ## Params:
9
10 * string $driver = NULL
11 The HTTP client driver to employ. Currently only the default driver, "curl", is supported.
12 * string $persistent_handle_id = NULL
13 If supplied, created curl handles will be persisted with this identifier for later reuse.
14
15 ## Throws:
16
17 * http\Exception\InvalidArgumentException
18 * http\Exception\UnexpectedValueException
19 * http\Exception\RuntimeException