Rate Limiting
Rate Limit: ein echter Limiter mit festem Zeitfenster (5 Requests pro 60 Sekunden je Client) zum Testen des Umgangs mit 429 und Retry-After. Clients werden am Header X-Client-Id erkannt, ohne ihn an der IP.
- GET
https://api.testingapis.com/api/RateLimitMake a rate-limited request that counts toward the limit. - POST
https://api.testingapis.com/api/RateLimit/resetReset the caller's window. - GET
https://api.testingapis.com/api/RateLimit/statusShow the caller's current window without counting a request.
Beispiel-Request
Make a rate-limited request that counts toward the limit. Vollständige Referenz und Send-Button (auf Englisch).
cURL
curl -X GET "https://api.testingapis.com/api/RateLimit" \
-H "X-Client-Id: docs-demo"Antwort · 200 OK
{
"message": "Request allowed.",
"clientId": "id:docs-demo",
"used": 1,
"remaining": 4,
"limit": 5,
"windowSeconds": 60
}