HumHub Documentation (unofficial)

RetryableHttpClient
in package
implements HttpClientInterface, ResetInterface uses AsyncDecoratorTrait

Automatically retries failing HTTP requests.

Tags
author

Jérémy Derussé jeremy@derusse.com

Table of Contents

Interfaces

HttpClientInterface
Provides flexible methods for requesting HTTP resources synchronously or asynchronously.
ResetInterface
Provides a way to reset an object to its initial state.

Properties

$logger  : mixed
$maxRetries  : mixed
$strategy  : mixed

Methods

__construct()  : mixed
request()  : ResponseInterface
Requests an HTTP resource.
stream()  : ResponseStreamInterface
{@inheritdoc}
getDelayFromHeader()  : int|null
passthru()  : Generator

Properties

Methods

request()

Requests an HTTP resource.

public request(string $method, string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface

Responses MUST be lazy, but their status code MUST be checked even if none of their public methods are called.

Implementations are not required to support all options described above; they can also support more custom options; but in any case, they MUST throw a TransportExceptionInterface when an unsupported option is passed.

Parameters
$method : string
$url : string
$options : array<string|int, mixed> = []
Return values
ResponseInterface

getDelayFromHeader()

private getDelayFromHeader(array<string|int, mixed> $headers) : int|null
Parameters
$headers : array<string|int, mixed>
Return values
int|null
Loading…
On this page

Search results