Which of the following is a valid response format?

Prepare effectively for the ServiceNow CAD certification. Study with detailed questions and explanations. Enhance your skills and knowledge for success in your exam!

Multiple Choice

Which of the following is a valid response format?

Explanation:
The main idea here is how a server tells a client what kind of data the response body contains, using a MIME type (Content-Type) in HTTP. A valid response format is any well-formed MIME type that matches the actual payload, so the client knows how to interpret it. JSON is the best answer in typical API scenarios because it’s lightweight, easy to parse in almost every programming language, and maps cleanly to common data structures like objects and arrays. This makes it the most interoperable default for exchanging data between servers and clients. XML formats (application/xml or text/xml) are also valid and are used in many systems, but they’re more verbose and less commonly preferred today for new APIs. A PDF (application/pdf) is a valid response format when the API returns a binary document rather than structured data, but it’s not the common choice for data payloads in typical API responses.

The main idea here is how a server tells a client what kind of data the response body contains, using a MIME type (Content-Type) in HTTP. A valid response format is any well-formed MIME type that matches the actual payload, so the client knows how to interpret it.

JSON is the best answer in typical API scenarios because it’s lightweight, easy to parse in almost every programming language, and maps cleanly to common data structures like objects and arrays. This makes it the most interoperable default for exchanging data between servers and clients.

XML formats (application/xml or text/xml) are also valid and are used in many systems, but they’re more verbose and less commonly preferred today for new APIs. A PDF (application/pdf) is a valid response format when the API returns a binary document rather than structured data, but it’s not the common choice for data payloads in typical API responses.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy