Requests the session session mechanism

 

 

A, Session association

  

  Cross request: for example, posting After logging in, this post is dependent on first login (login required pass cookie) http protocol is stateless, that is, each request is independent.

  Then a series of actions after login, we need to use the cookie to verify identity is logged on. For efficient management sessions, keeping the session, so there will be session

 

  Code demonstrates:

  

 

Guess you like

Origin www.cnblogs.com/dearddu/p/12463430.html