Bird
0
0

How does the code on demand constraint affect REST API design, and why is it considered optional?

hard📝 Application Q9 of 15
Rest API - REST API Fundamentals
How does the code on demand constraint affect REST API design, and why is it considered optional?
AIt mandates caching of all responses, optional for performance.
BIt allows servers to send executable code to clients, enhancing flexibility but is optional because not all clients support it.
CIt requires servers to store client state, which is optional.
DIt forces clients to execute all code locally, which is mandatory for REST compliance.
Step-by-Step Solution
Solution:
  1. Step 1: Define code on demand constraint

    Servers can send executable code (like JavaScript) to clients to extend functionality.
  2. Step 2: Explain why optional

    Not all clients can run code, so this is optional in REST.
  3. Final Answer:

    It allows servers to send executable code to clients, enhancing flexibility but is optional because not all clients support it. -> Option B
  4. Quick Check:

    Code on demand = optional executable code from server [OK]
Quick Trick: Code on demand is optional server-sent executable code [OK]
Common Mistakes:
  • Thinking code on demand is mandatory
  • Confusing with client-side state storage
  • Assuming it mandates caching

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes