A team is designing an interface that relies on Representational State Transfer principles. They want to reduce ties between consecutive client requests. Which approach meets these principles?
Store user session data in a central memory cache between requests
Encrypt user credentials under one shared key so they do not travel in requests
Include user tokens in each request to avoid server-based session details
Use an ephemeral data store to track user context throughout each session
Tokens travel with every request and maintain user context without server-based storage. The other options rely on storing or tracking session details on the server or in a persistent data store, which introduces stateful dependencies and breaks these principles.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Representational State Transfer (REST)?
Open an interactive chat with Bash
Why are user tokens important in stateless APIs?
Open an interactive chat with Bash
What is the downside of using server-based session storage in REST APIs?