Difference between Request.Cookies and Response.Cookies

前端 未结 4 2033
孤街浪徒
孤街浪徒 2021-01-31 15:16

I use both of these many times in my code and don\'t really know what the difference is , if a cookie is set shouldn\'t it be exactly the same in request and response? and is re

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-31 15:47

    The request cookie is what is send from the client to the server (thus what the browser provides). The response cookie are the cookies that you want to place in the browser. The next connection from the browser that accepted the cookie from the response object will provide the cookie in the request object.

提交回复
热议问题