Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TooManyRequestsHttpException.php

function TooManyRequestsHttpException::__construct

Parameters

int|string|null $retryAfter The number of seconds or HTTP-date after which the request may be retried:

Overrides HttpException::__construct

2 calls to TooManyRequestsHttpException::__construct()
CacheableTooManyRequestsHttpException::__construct in core/lib/Drupal/Core/Http/Exception/CacheableTooManyRequestsHttpException.php
CacheableTooManyRequestsHttpException::__construct in core/lib/Drupal/Core/Http/Exception/CacheableTooManyRequestsHttpException.php
1 method overrides TooManyRequestsHttpException::__construct()
CacheableTooManyRequestsHttpException::__construct in core/lib/Drupal/Core/Http/Exception/CacheableTooManyRequestsHttpException.php

File

vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php, line 24

Class

TooManyRequestsHttpException
@author Ben Ramsey <ben@benramsey.com>

Namespace

Symfony\Component\HttpKernel\Exception

Code

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);
}
RSS feed
Powered by Drupal