Bird
0
0

Which HTTP header does Spring Boot use to decide the response format during content negotiation?

easy📝 Conceptual Q2 of 15
Spring Boot - Request and Response Handling
Which HTTP header does Spring Boot use to decide the response format during content negotiation?
AUser-Agent
BContent-Type
CAuthorization
DAccept
Step-by-Step Solution
Solution:
  1. Step 1: Identify the header used for content negotiation

    The client sends the 'Accept' header to tell the server which formats it can handle.
  2. Step 2: Differentiate from other headers

    'Content-Type' is for request body format, 'Authorization' is for security, 'User-Agent' identifies client software.
  3. Final Answer:

    Accept -> Option D
  4. Quick Check:

    Content negotiation header = Accept [OK]
Quick Trick: Accept header tells server preferred response format [OK]
Common Mistakes:
  • Confusing Accept with Content-Type header
  • Using Authorization header for format negotiation
  • Ignoring the role of Accept header

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes