Bird
Raised Fist0

Given the following HTTP response header:

medium📝 Predict Output Q13 of Q15
Rest API - Rate Limiting and Throttling

Given the following HTTP response header:

HTTP/1.1 503 Service Unavailable
Retry-After: 60

What should the client do?

AWait 60 seconds before retrying the request
BRetry the request immediately
CIgnore the Retry-After header and retry after 5 seconds
DAbort the request permanently
Step-by-Step Solution
Solution:
  1. Step 1: Interpret the Retry-After header value

    The header value '60' means the client should wait 60 seconds before retrying.
  2. Step 2: Match client action to header instruction

    Wait 60 seconds before retrying the request correctly instructs to wait 60 seconds before retrying, which follows the server's guidance.
  3. Final Answer:

    Wait 60 seconds before retrying the request -> Option A
  4. Quick Check:

    Retry-After: 60 means wait 60 seconds [OK]
Quick Trick: Retry-After number means wait that many seconds [OK]
Common Mistakes:
MISTAKES
  • Retrying immediately ignoring Retry-After
  • Assuming Retry-After is in milliseconds
  • Treating Retry-After as a permanent failure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes