trait HasOptions

Properties

protected ArrayRepository|null $optionRepository

The request options.

Methods

array
options()

Get the request options.

withOptions(array $options)

Add options to the request.

withoutOptions(array|string $keys)

Remove the given options from the request.

maxRedirects(int $max)

Specify the maximum number of redirects to allow.

withoutRedirecting()

Indicate that redirects should not be followed.

withoutVerifying()

Indicate that TLS certificates should not be verified.

sink(resource|StreamInterface|string $to)

Specify where the response body should be stored.

timeout(float|int $seconds)

Specify the request timeout in seconds.

connectTimeout(float|int $seconds)

Specify the connection timeout in seconds.

withTelescopeTags(array $tags)

Add Telescope tags to the request.

withoutTelescope()

Disable Telescope recording for the request.

array
defaultOptions()

Resolve the default request options.

optionRepository()

Get the request option repository.

Details

at line 23
array options()

Get the request options.

Return Value

array

at line 34
HasOptions withOptions(array $options)

Add options to the request.

Parameters

array $options

Return Value

HasOptions

at line 47
HasOptions withoutOptions(array|string $keys)

Remove the given options from the request.

Parameters

array|string $keys

Return Value

HasOptions

at line 59
HasOptions maxRedirects(int $max)

Specify the maximum number of redirects to allow.

Parameters

int $max

Return Value

HasOptions

at line 77
HasOptions withoutRedirecting()

Indicate that redirects should not be followed.

Return Value

HasOptions

at line 87
HasOptions withoutVerifying()

Indicate that TLS certificates should not be verified.

Return Value

HasOptions

at line 98
HasOptions sink(resource|StreamInterface|string $to)

Specify where the response body should be stored.

Parameters

resource|StreamInterface|string $to

Return Value

HasOptions

at line 108
HasOptions timeout(float|int $seconds)

Specify the request timeout in seconds.

Parameters

float|int $seconds

Return Value

HasOptions

at line 118
HasOptions connectTimeout(float|int $seconds)

Specify the connection timeout in seconds.

Parameters

float|int $seconds

Return Value

HasOptions

at line 129
HasOptions withTelescopeTags(array $tags)

Add Telescope tags to the request.

Parameters

array $tags

Return Value

HasOptions

at line 139
HasOptions withoutTelescope()

Disable Telescope recording for the request.

Return Value

HasOptions

at line 149
protected array defaultOptions()

Resolve the default request options.

Return Value

array

at line 157
protected ArrayRepository optionRepository()

Get the request option repository.

Return Value

ArrayRepository