REST Constraint #6: Code on Demand—When, Why, and How to Use It
Of all the REST constraints, Code on Demand is the one that most developers either overlook or actively avoid. Unlike the other five constraints, it is the only optional one, meaning a RESTful system doesn’t have to use it. But when applied correctly, it can unlock powerful capabilities in web applications. Let’s explore what Code on Demand is, when it makes sense to use it, and why most REST APIs don’t rely on it.