Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我通过 httpwebrequest 使用 POST 变量成功登录网站并通过 HttpWebResponse 获得响应后..如何使用“当前登录”实例查询其他网站?我将它保存到某个变量吗?
POST变量是在服务器端访问的,用户状态通常会存储在 cookie 中或会话中。
POST
该类HttpWebResponse提供了一个Cookies集合,您可以使用该集合保存加密的身份验证数据或会话密钥,以供将来HttpWebRequest在HttpWebRequest.CookieContainer.
HttpWebResponse
Cookies
HttpWebRequest
HttpWebRequest.CookieContainer
当然,这都是假设初始请求以其中一种形式存储用户认证数据。