Bird
0
0

Which of the following is the correct way to specify JSON format in a REST API response 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 a REST API response header?
AContent-Type: text/html
BContent-Type: application/xml
CContent-Type: application/json
DContent-Type: text/plain
Step-by-Step Solution
Solution:
  1. Step 1: Identify the standard MIME type for JSON

    The correct MIME type for JSON data is 'application/json'.
  2. Step 2: Match the header to JSON format

    Setting 'Content-Type: application/json' tells clients the response is JSON formatted.
  3. Final Answer:

    Content-Type: application/json -> Option C
  4. Quick Check:

    JSON header = application/json [OK]
Quick Trick: JSON content type is always application/json [OK]
Common Mistakes:
  • Using text/html for JSON responses
  • Confusing XML and JSON content types
  • Omitting Content-Type header

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes