IOT Questions and Answers – HTTP Protocol

This set of IOT Multiple Choice Questions & Answers (MCQs) focuses on “HTTP Protocol”.

1. Does HTTP protocol take more power.
a) True
b) False
View Answer

Answer: a
Explanation: 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
View Answer

Answer: c
Explanation: 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
View Answer

Answer: a
Explanation: When we compare HTTP with MQTT, HTTP is lot slower, HTTP will send 1,708 messages/hour whereas MQTT sends 160,278 messages/hour.
advertisement
advertisement

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
View Answer

Answer: d
Explanation: 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
View Answer

Answer: a
Explanation: 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.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Response is made up of a ________ status code.
a) two-digit
b) three-digit
c) five-digit
d) six-digit
View Answer

Answer: b
Explanation: HTTP status codes are three-digit responses from the server to the browser-side request.

7. HTTP allows which response?
a) Multiplexing
b) Serial
c) Coherent
d) Binary
View Answer

Answer: a
Explanation: HTTP 2.0 allows multiplexing responses: that is sending responses in parallel. This fixes the “head-of-line blocking” problem of HTTP 1.1 where only one request can be outstanding on a TCP/IP connection at a time.
advertisement

8. Which protocol provides server push?
a) SPI
b) MQTT
c) CoAP
d) HTTP
View Answer

Answer: d
Explanation: 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
View Answer

Answer: b
Explanation: 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.
advertisement

10. HTTP expands?
a) HyperText Transfer Protocol
b) HyperTerminal Transfer Protocol
c) HyperText Terminal Protocol
d) HyperTerminal Text Protocol
View Answer

Answer: a
Explanation: HTTP is the one of the standard protocols 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
View Answer

Answer: c
Explanation: 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. Status line is present in which message format?
a) Request message
b) Response message
c) Both request and response
d) Neither request nor response
View Answer

Answer: b
Explanation: 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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: c
Explanation: 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
View Answer

Answer: a
Explanation: HTTP pipelining further reduces lag time, allowing clients to send multiple request before waiting for each response.

Sanfoundry Global Education & Learning Series – IOT.

To practice all areas of IOT, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.