Bird
0
0

Which of the following is the correct way to specify JSON format in the Accept header?

easy📝 Syntax Q12 of 15
Rest API - Request and Response Format
Which of the following is the correct way to specify JSON format in the Accept header?
AAccept: application/xml
BAccept: text/html
CAccept: image/png
DAccept: application/json
Step-by-Step Solution
Solution:
  1. Step 1: Recall MIME types for common formats

    JSON format uses the MIME type 'application/json'.
  2. Step 2: Match Accept header to JSON

    The correct Accept header for JSON is 'Accept: application/json'.
  3. Final Answer:

    Accept: application/json -> Option D
  4. Quick Check:

    JSON MIME type = application/json [OK]
Quick Trick: JSON MIME type always is application/json in Accept header [OK]
Common Mistakes:
MISTAKES
  • Using text/html for JSON
  • Confusing image/png with data formats
  • Using application/xml instead of JSON

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes