HTTP Methods (5)

HTTP Headers (1)

Miscellaneous (3)

Resources (4)

Basics (5)

Mediatypes (1)

This question still needs answering. If you like to help, make a pull request for this question.

What is the code-on-demand constraint, and why is it an optional constraint?

Code-on-Demand (COD) is the only optional constraint in REST. It allows clients to improve its flexibility because in fact it is the server who decides how certain things will be done. For instance, with Code-On-Demand, a client can download a javascript, java applet or even a flash application in order to encrypt communication so servers are not aware of any encryption routines / keys used in this process.

However, using COD reduces visibility, which is why this constraint is optional. Also, not every API needs this kind of flexibility.



Copyright 2012 Joshua Thijssen and others. Like to contribute? Add your recipe to our github repository.
Looking for Puppet recipies? Try the Puppet CookBook.
Fork me on GitHub