62,046
社区成员
发帖
与我相关
我的任务
分享
Cookie: ASP.NET_SessionId=4lfgopz3bft2hwbfr20tve55; timeStamp=1
/// 解析Cookie
/// </summary>
/// <param name="response"></param>
private void ParseCookie(HttpWebResponse response)
{
if (!IgnoreCookies)
{
string cookiesExpression = response.Headers["Set-Cookie"];
if (!string.IsNullOrEmpty(cookiesExpression))
{
Uri cookieUrl = new Uri(string.Format("{0}://{1}:{2}/",
response.ResponseUri.Scheme,
response.ResponseUri.Host,
response.ResponseUri.Port));
_cookieContainer.SetCookies(cookieUrl, cookiesExpression);
}
}
}
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href=''>here</a>.</h2>
</body></html>