phasync
HttpClientOptions / __construct

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#

ExceptionWhen
InvalidArgumentExceptionFor an option name that is not a property

Examples#

Example 1
$options = new HttpClientOptions(['followLocation' => false, 'maxRedirs' => 0]);