O'Reilly logo

Getting Started with the Internet of Things by Cuno Pfister

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What You Should Know About HTTP GET

To query the state of a device’s sensor, send it HTTP GET messages. GET is defined as harmless in that it leaves no trace on the resources it accesses. Therefore, your server must not change any of its resources as a side effect of responding to a GET request. The only state changes due to a GET request should be for monitoring purposes—e.g., to keep track of how many GET requests have been handled since the server was started.

As a consequence, you should never use GET for changing a resource, starting an activity, or producing another side effect. So you shouldn’t put links into your web pages that, when clicked, cause the formatting of a hard disk, the firing of a rocket, the closing of a valve, etc. If you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required