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 PUT

To change the state of a device’s actuator, you send it HTTP PUT messages. Like GET, PUT is defined as being idempotent, meaning that issuing the same PUT request multiple times has the same effect on the server’s resources as issuing it only once—assuming no one else changes the same resource. This is particularly relevant in one situation: suppose your client program has sent a PUT request, but it does not get back a response. After a while, the client will time out. What should happen then? If the request had been lost on its way to the server, your client could simply try again and send the PUT request a second time.

But what if the request had been received by the server, was processed correctly, and only ...

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