Bird
0
0

Which HTTP header is commonly used with a 301 or 302 redirect to specify the new URL?

easy📝 Conceptual Q2 of 15
Rest API - HTTP Status Codes
Which HTTP header is commonly used with a 301 or 302 redirect to specify the new URL?
ALocation
BAuthorization
CContent-Type
DCache-Control
Step-by-Step Solution
Solution:
  1. Step 1: Identify the header for redirect URLs

    The Location header tells the client where to go next.
  2. Step 2: Confirm other headers are unrelated

    Content-Type defines data type, Authorization is for credentials, Cache-Control manages caching.
  3. Final Answer:

    Location -> Option A
  4. Quick Check:

    Redirect URL header = Location [OK]
Quick Trick: Redirects use Location header to specify new URL [OK]
Common Mistakes:
MISTAKES
  • Using Content-Type instead of Location
  • Confusing Authorization with redirect headers
  • Omitting the Location header in redirects

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes