上传者: 38629976
|
上传时间: 2021-11-03 12:24:33
|
文件大小: 28KB
|
文件类型: -
有httponly的cookie,在httpwebreqeust请求时,会获取不到,可以采用直接获取head中的set-cookie,再转换成Cookie添加到CookieContainer中
string cookieStr = resp.Headers[Set-Cookie];
string[] cookstr = cookieStr.Split(';');
foreach (string str in cookstr)
{
string[] arr = str.T