NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class HttpBackoffStrategy

Strategy used to retry HTTP requests based on the response code.

Retries 500 and 503 error by default.

  Guzzle\Plugin\Backoff\AbstractBackoffStrategy implements Guzzle\Plugin\Backoff\BackoffStrategyInterface
  Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy
  Guzzle\Plugin\Backoff\HttpBackoffStrategy

Namespace: Guzzle\Plugin\Backoff
Located at Guzzle/Plugin/Backoff/HttpBackoffStrategy.php

## Methods summary

- `protected` `getDelay ( int $retries, Guzzle\Http\Message\RequestInterface $request, Guzzle\Http\Message\Response $response = null, Guzzle\Http\Exception\HttpException $e = null )`

  Implement the concrete strategy

## Methods detail

# `protected boolean|integer|null`
`getDelay( integer $retries, `Guzzle\Http\Message\RequestInterface` $request, `Guzzle\Http\Message\Response` $response = null, `Guzzle\Http\Exception\HttpException` $e = null )`

Implement the concrete strategy

#### Parameters

$retries
  `integer`
  $retries Number of retries of the request
$request
  ``Guzzle\Http\Message\RequestInterface``
  $request Request that was sent
$response
  ``Guzzle\Http\Message\Response``
  $response Response that was received. Note that there may not be a response
$e
  ``Guzzle\Http\Exception\HttpException``
  $e Exception that was encountered if any

#### Returns

`boolean|integer|null`
Returns false to not retry or the number of seconds to delay between retries. Return true or null to defer to the next strategy if available, and if not, return 0.

### Methods inherited from Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy

`__construct()`, `getDefaultFailureCodes()`, `makesDecision()`

### Methods inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy

`getBackoffPeriod()`, `getNext()`, `setNext()`

### Magic methods summary

## Properties summary

`protected static array` | $defaultErrorCodes | # Default cURL errors to retry

### Properties inherited from Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy

`$errorCodes`

### Properties inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy

`$next`