class TooManyRequestsHttpException
@author Ben Ramsey <ben@benramsey.com>
Hierarchy
- class \Symfony\Component\HttpKernel\Exception\HttpException extends \Symfony\Component\HttpKernel\Exception\RuntimeException implements \Symfony\Component\HttpKernel\Exception\HttpExceptionInterface
- class \Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException extends \Symfony\Component\HttpKernel\Exception\HttpException
Expanded class hierarchy of TooManyRequestsHttpException
See also
http://tools.ietf.org/html/rfc6585
1 file declares its use of TooManyRequestsHttpException
- CacheableTooManyRequestsHttpException.php in core/
lib/ Drupal/ Core/ Http/ Exception/ CacheableTooManyRequestsHttpException.php
File
-
vendor/
symfony/ http-kernel/ Exception/ TooManyRequestsHttpException.php, line 19
Namespace
Symfony\Component\HttpKernel\ExceptionView source
class TooManyRequestsHttpException extends HttpException {
/**
* @param int|string|null $retryAfter The number of seconds or HTTP-date after which the request may be retried
*/
public function __construct(int|string|null $retryAfter = null, string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) {
if ($retryAfter) {
$headers['Retry-After'] = $retryAfter;
}
parent::__construct(429, $message, $previous, $headers, $code);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
HttpException::fromStatusCode | public static | function | |||
HttpException::getHeaders | public | function | Returns response headers. | Overrides HttpExceptionInterface::getHeaders | |
HttpException::getStatusCode | public | function | Returns the status code. | Overrides HttpExceptionInterface::getStatusCode | |
HttpException::setHeaders | public | function | |||
TooManyRequestsHttpException::__construct | public | function | Overrides HttpException::__construct | 1 |