IOT Multiple Choice Questions on “HTTP Protocol”.
1. Does HTTP protocol take more power.
a) True
b) False
Answer: a
Clarification: Uses more battery(percentage battery/hour and percentage battery/message). For HTTP in sending message it takes 18.43% while for MQTT it takes 16.13%.
2. How many messages will HQTTP will send in 1024?
a) All
b) 256
c) 240
d) 514
Answer: c
Clarification: It is less reliable, only 240(3G)/524(WiFi) messages were received out of total of 1024 messages.
3. How many messages will HTTP will send per hour?
a) 1,708
b) 160,278
c) 3,628
d) 263,314
Answer: a
Clarification: When we compare HTTP with MQTT, HTTP is lot slower, HTTP will send 1,708 messages/hour whereas MQTT sends 160,278 messages/hour.
4. What does HTTP do?
a) Enables network resources and reduces perception of latency
b) Reduces perception of latency and allows multiple concurrency exchange
c) Allows multiple concurrent exchange and enables network resources
d) Enables network resources and reduces perception of latency and Allows multiple concurrent exchange
Answer: d
Clarification: It enables more efficient use of network resources and a reduced perception of latency by introducing header field compression and allowing multiple concurrent exchanges on the same connection.
5. A request from client is basically made of ______
a) Method
b) Task
c) Event
d) Signal
Answer: a
Clarification: HTTP is a request/ response protocol where clients request information from a server and the server responds to these requests accordingly. A request is made up of a method, a resource, some headers, and some optional content.
6. Response is made up of a ________ status code.
a) two-digit
b) three-digit
c) five-digit
d) six-digit
Answer: b
Clarification: HTTP is a request/ response protocol where clients request information from a server and the server responds to these requests accordingly. A response is made up of a three-digit status code, some headers and some optional content.
7. HTTP allows which response?
a) Multiplexing
b) Serial
c) Coherent
d) Binary
Answer: a
Clarification: HTTP allows multiplexing responses: that is sending responses in parallel. This fixes the “head-of-line blocking” problem of HTTP where only one request can be outstanding on a TCP/IP connection at a time.
8. Which protocol provides server push?
a) SPI
b) MQTT
c) CoAP
d) HTTP
Answer: d
Clarification: Finally, HTTP/2 introduces the notion of server push. Concretely this means the server can provide content to clients without having to wait for them to send a request.
9. WOT reduces ________ of HTTP.
a) Overrun
b) Overhead
c) Overload
d) Load
Answer: b
Clarification: The WOT as it leads to a more efficient use of connections, which reduces the overhead of HTTP. It also leads to faster transmission and hence potential saving in terms of battery power required to communicate.
10. HTTP expands?
a) HyperText Transfer Protocol
b) HyperTerminal Transfer Protocol
c) HyperText Terminal Protocol
d) HyperTerminal Text Protocol
Answer: a
Clarification: It is the one of the standard protocol that expands as HyperText Transfer protocol.
11. How many types of message formats are there in HTTP protocol?
a) 4 types
b) 3 types
c) 2 types
d) 5 types
Answer: c
Clarification: The client and server communication by sending plain text message. The client sends requests to the server and server sends the responses. That is
–> Request message
–> Response message.
12. Statue line is present in which message format?
a) Request message
b) Response message
c) Both request and response
d) Neither request nor response
Answer: b
Clarification: A status line which includes the status code and reason message (e.g., HTTP/1.1 200 OK, which indicates that the client’s request succeeded).
13. Request field is present in which message format?
a) Request message
b) Response message
c) Both request and response
d) Neither request nor response
Answer: a
Clarification: The request message consists of a request line(e.g., GET /image/logo.png HTTP/1.1, which requests a resource called /image/logo.png from the server).
14. Does HTTP protocol have _________ handshakes.
a) 2 way
b) 1 way
c) 3 way
d) 5 way
Answer: c
Clarification: Persistent connections reduce request latency perceptible, because the client does not need to re-negotiate the TCP 3 way handshake connection after the first request has been sent.
15. Does HTTP has pipelining.
a) True
b) False
Answer: a
Clarification: HTTP pipelining further reduces lag time, allowing clients to send multiple request before waiting for each response.