Issue
In normal stateful
API html pages are returned, whereas in Angular each request to back-end returns a JavaScript object instead. Does only that fact make the back-end stateless
? If not, what does stateless
term actually mean? For example, in Angular authentication, a token is returned, and that token is used to authorize each request to a back-end. What makes the back-end stateless
in this example?
Solution
What does stateless RESTful API actually mean?
Stateless is an important REST constraint, and means something precise:
each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is therefore kept entirely on the client.
...
Scalability is improved because not having to store state between requests allows the server component to quickly free resources, and further simplifies implementation because the server doesn't have to manage resource usage across requests.
Cookies, for example, are not stateless.
Answered By - VoiceOfUnreason
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.