using (HttpWebResponse httpWebResponse = (HttpWebResponse)templateRequest.GetResponse())
{
using (StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream()))
{
header = httpWebResponse.Cookies;
这是我的回复饼干,但这是我的要求
HttpWebRequest templateRequest = base.GetTemplateRequest("https://apps.runescape.com/runemetrics/profile/profile?activities=20");
templateRequest.CookieContainer = ???????????
现在如何从请求的响应中获取我的cookie?
我试过
CookieContainer cookies = new CookieContainer();
foreach(Cookie cookie in header)
{
cookies.Add(cookie);
}
templateRequest.CookieContainer = cookies;
但它不起作用:(