Method
HttpClientOptions::__construct
Create the options from an array of values keyed by property name.
Description#
public HttpClientOptions::__construct(
array $options = []
)Parameters#
- $options array = []
- Option values keyed by property name
Errors / Exceptions#
| Exception | When |
|---|---|
InvalidArgumentException | For an option name that is not a property |
Examples#
$options = new HttpClientOptions(['followLocation' => false, 'maxRedirs' => 0]);