New in 2.4: Test runs you can trust See what's new →

Limite de taxa

Limite de taxa: um limitador real de janela fixa (5 requisições a cada 60 segundos por cliente) para testar o tratamento de 429 e Retry-After. Os clientes são identificados pelo cabeçalho X-Client-Id ou, sem ele, pelo IP.

Requisição de exemplo

Make a rate-limited request that counts toward the limit. Referência completa e botão Send (em inglês).

cURL
curl -X GET "https://api.testingapis.com/api/RateLimit" \
  -H "X-Client-Id: docs-demo"
Executar no Studio
Resposta · 200 OK
{
  "message": "Request allowed.",
  "clientId": "id:docs-demo",
  "used": 1,
  "remaining": 4,
  "limit": 5,
  "windowSeconds": 60
}