c# Get httponly cookie

后端 未结 2 917
一生所求
一生所求 2020-12-12 01:25

How can i get a httponly cookie in a httpwebresponse ? Habitually i use a CookieContainer to get the cookies in a httpwebresponse, but it doesnt work with httponly cookie.

2条回答
  •  自闭症患者
    2020-12-12 02:05

    You cannot retrieve HTTPOnly cookies from the CookieContainer.

    from MSDN

    ...You must always create a CookieContainer to send with a request if you want cookies to be returned on the response. This is also true for HTTPOnly cookies, which you cannot retrieve.

提交回复
热议问题