---
answer: direct
beat: api-architecture
source: 1 article · updated: November 15, 2026
---

Why is code-on-demand considered the only optional constraint in REST?

Code-on-demand allows servers to transfer executable code (such as JavaScript applets) to extend client capabilities, but client environments may choose to disable dynamic code execution for security.

Answered in

What Makes an API RESTful: The Six Constraints and Common Real-World Violations

Explore Roy Fielding's six architectural REST constraints, cache semantics, layered systems, and where real production APIs break the specification.

Crashtech Editorial November 15, 2026 Api Architecture

Read the full analysis

Other questions this article answers

More api architecture questions

Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the Api Architecture beat.