Documentation

BackoffStrategyInterface

Strategy to determine if a request should be retried and how long to delay between retries

Table of Contents

Methods

getBackoffPeriod()  : bool|int
Get the amount of time to delay in seconds before retrying a request

Methods

getBackoffPeriod()

Get the amount of time to delay in seconds before retrying a request

public getBackoffPeriod(int $retries, RequestInterface $request[, Response $response = null ][, HttpException $e = null ]) : bool|int
Parameters
$retries : int

Number of retries of the request

$request : RequestInterface

Request that was sent

$response : Response = null

Response that was received. Note that there may not be a response

$e : HttpException = null

Exception that was encountered if any

Return values
bool|int

Returns false to not retry or the number of seconds to delay between retries


        
On this page

Search results