Bird
0
0

Which of the following correctly formats the Authorization header to send a Bearer token in an HTTP request?

easy📝 Syntax Q3 of 15
Rest API - Authentication and Authorization
Which of the following correctly formats the Authorization header to send a Bearer token in an HTTP request?
AAuthorization: Bearer=abcdef123456
BAuthorization: Token abcdef123456
CAuthorization: BearerToken abcdef123456
DAuthorization: Bearer abcdef123456
Step-by-Step Solution
Solution:
  1. Step 1: Understand the Bearer token format

    The Authorization header must start with the word 'Bearer' followed by a space and then the token.
  2. Step 2: Analyze each option

    Authorization: Bearer abcdef123456 correctly uses 'Bearer' followed by a space and the token. Options B, C, and D use incorrect keywords or formatting.
  3. Final Answer:

    Authorization: Bearer abcdef123456 -> Option D
  4. Quick Check:

    Check for exact 'Bearer ' prefix and space before token [OK]
Quick Trick: Use 'Bearer ' followed by token with a space [OK]
Common Mistakes:
  • Omitting the space after 'Bearer'
  • Using 'Token' instead of 'Bearer'
  • Concatenating 'Bearer' and token without space

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes