Last Updated on August 3, 2021 by Admin 2
Which of the following formats are not used by a REST API to produce output? (Choose three.)
- HTTP
- JSON
- CSV
- XML
- HTML
Representational state transfer (REST) does not produce output in comma separated values (CSV) format, Hypertext Markup Language (HTML) format, or Hypertext Transfer Protocol (HTTP) format. Instead, REST produces output in JavaScript Object Notation (JSON) or Extensible Markup Language (XML) format. REST is an Application Programming Interface (API) architecture that uses HTTP or HTTP Secure (HTTPS) to enable external resources to access and make use of programmatic methods that are exposed by the API. For example, a web application that retrieves user product reviews from an online marketplace for display on third-party websites might obtain those reviews by using methods provided in an API that is developed and maintained by that marketplace. The JSON or XML output that is returned by the API is parsed by the third-party website for display.
HTTP is the Open Systems Interconnection (OSI) networking model Application layer protocol that is used to transfer information from a web server to a web browser. A REST API uses HTTP to transmit requests for information to a web server, which is not the same as producing the formatted output that is returned from the server.
Although HTML is similar to XML, which uses tags like HTML does, XML requires a strict syntax and is typically used to structure data, not format and render data in a web browser. HTML, on the other hand, is designed to inform a web browser about how given information should be displayed.
The CSV format is a common tabular format that is supported by spreadsheet applications and other business reporting applications. CSV files are plain-text files that segregate the fields of a table by using a combination of quotation marks, symbolic delimiters such as a comma or a semicolon, and line breaks.