public function Response::getRetryAfter

Get the Retry-After HTTP header

Return value

int|null If an entity is temporarily unavailable, this instructs the client to try again after a specified period of time.

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Response.php, line 621

Class

Response
Guzzle HTTP response object

Namespace

Guzzle\Http\Message

Code

public function getRetryAfter() {
  $time = $this
    ->getHeader('Retry-After', true);
  if ($time === null) {
    return null;
  }
  if (!is_numeric($time)) {
    $time = strtotime($time) - time();
  }
  return (int) $time;
}