stateless protocol and stateful protocol

后端 未结 7 932
离开以前
离开以前 2020-12-23 09:45

How to understand stateless protocol and stateful protocol? HTTP is a stateless protocol and FTP is a stateful protocol. For the web applications requiring a lot of interact

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-23 10:02

    Anything that forgets whatever it did in past is stateless, such as http
    Anything that can keep the history is statefull, such as database
    

    Http is a stateless protocol, that's why it forgets the user information.

    We make http as statefull protocol using jsonWebToken(JWT) i.e. on each request going to server, server will first verify the user using JWT.

提交回复
热议问题