W3cubDocs

/Symfony 2.7

Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException

class TooManyRequestsHttpException extends HttpException

TooManyRequestsHttpException.

Methods

__construct(int|string $retryAfter = null, string $message = null, Exception $previous = null, int $code)

Constructor.

integer getStatusCode()

Returns the status code.

from HttpException
array getHeaders()

Returns response headers.

from HttpException

Details

public __construct(int|string $retryAfter = null, string $message = null, Exception $previous = null, int $code)

Constructor.

Parameters

int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried
string $message The internal exception message
Exception $previous The previous exception
int $code The internal exception code

public integer getStatusCode()

Returns the status code.

Return Value

integer An HTTP response status code

public array getHeaders()

Returns response headers.

Return Value

array Response headers