Bird
0
0

A client sends this HTTP request header:

hard📝 Application Q9 of 15
Rest API - Request and Response Format
A client sends this HTTP request header:
Accept: application/json;q=0.8, application/xml;q=0.9

What does the q parameter indicate?
AThe quality of the data sent by the client
BThe size limit for the response
CThe version of the media type
DThe relative preference weight for each media type
Step-by-Step Solution
Solution:
  1. Step 1: Understand the 'q' parameter in Accept header

    The 'q' value is a quality factor showing preference weight for media types.
  2. Step 2: Interpret the given values

    Higher q means higher preference; here XML (0.9) is preferred over JSON (0.8).
  3. Final Answer:

    The relative preference weight for each media type -> Option D
  4. Quick Check:

    'q' parameter = preference weight [OK]
Quick Trick: 'q' sets priority of media types in Accept header [OK]
Common Mistakes:
MISTAKES
  • Thinking 'q' is data quality
  • Confusing 'q' with version number
  • Assuming 'q' limits response size

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes