Web Science/Part1: Foundations of the web/Hypertext Transfer Protocol/Content negotiation/quiz

From Wikiversity
Jump to navigation Jump to search

1 Which of the following HTTP requests should be used to request an XML file from a server

GET /file HTTP/1.0\r\nAccept: text/xml\r\n\r\n
GET /file?type=xml HTTP/1.0\r\n\r\n
GET /file.xml HTTP/1.0\r\n\r\n
GET /file.xml HTTP/1.0\r\nAccept: text/xml\r\n\r\n

2 Which of the following HTTP requests would technically work (if implemented) to request an XML file from a server

GET /file HTTP/1.0\r\nAccept: text/xml\r\n\r\n
GET /file?type=xml HTTP/1.0\r\n\r\n
GET /file.xml HTTP/1.0\r\n\r\n
GET /file.xml HTTP/1.0\r\nAccept: text/xml\r\n\r\n

3 What is the main aim of content negotiation?

human to machine communication over http
human to human communication over http
machine to machine communication over http
All of the above