Bird
Raised Fist0

If an API response has headers:

medium📝 Predict Output Q5 of Q15
Rest API - Rate Limiting and Throttling
If an API response has headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1680003600

What should the client do when X-RateLimit-Remaining is zero?
AStop sending requests until the reset time
BContinue sending requests immediately
CIgnore the rate limit headers
DSend requests faster to catch up
Step-by-Step Solution
Solution:
  1. Step 1: Interpret Remaining = 0 meaning

    Remaining zero means no requests left in the current window.
  2. Step 2: Understand proper client behavior

    The client should wait until the reset time before sending more requests to avoid being blocked.
  3. Final Answer:

    Stop sending requests until the reset time -> Option A
  4. Quick Check:

    Remaining 0 means wait until reset [OK]
Quick Trick: Stop requests when remaining is zero until reset time [OK]
Common Mistakes:
MISTAKES
  • Ignoring remaining count
  • Sending requests immediately after limit reached
  • Trying to bypass rate limits

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes