0

Can we create a shopping website using ASP.NET Web API? REST constraints state that it should be stateless, So how do we maintain session which is necessary in a shopping website?

amod
  • 1
  • 5

1 Answers1

0

Yes, you absolutely can.

REST constraints state in the sense that you shouldn't store client sessions on the server-side. Instead, you pass the state from client to server, whenever it is needed. There may be multiple ways to go about this, depending on the problem you are trying to solve.

You might find the following links useful:

  1. If REST applications are supposed to be stateless, how do you manage sessions?

  2. https://www.safaribooksonline.com/library/view/restful-web-services/9780596809140/ch01s03.html

Hope this helps!

Swanky Coder
  • 862
  • 1
  • 8
  • 23