ResponseEntity.tooManyRequests constructor
ResponseEntity.tooManyRequests(
{ - Object? body,
- int? retryAfter,
})
Implementation
ResponseEntity.tooManyRequests({
Object? body,
int? retryAfter,
Map<String, /* String | List<String> */ Object>? headers,
}) : this(
HttpStatus.tooManyRequests.value,
body: body ??
'Too many requests.${retryAfter != null ? ' Please try again in $retryAfter seconds.' : ''}',
headers: {
if (headers != null) ...headers,
if (retryAfter != null) HttpHeaders.retryAfter: '$retryAfter',
},
);