Home > Net >  C # cefsharp core browser cannot read JSESSIONID
C # cefsharp core browser cannot read JSESSIONID

Time:09-19

Want to pass cefSharp login first and then get JSESSIONID, reoccupy webrequest login crawler directly, lacking JSESSIONID,
Is in the Chrome F12 can see JSESSIONID, why c # can't read it, a great god, please give a read the JSESSIONID, HTTPONLY code

CodePudding user response:

 
Task Res=client. PostAsync (url, content);
If (res) Result) StatusCode==System.Net.HttpStatusCode.OK)
{
Var temp=res. Result. Headers. GetValues (" Set - cookies ");
If (string. Join (";" , temp.) the Contains (" JSESSIONID "))
DataCenter. Default. CookieList=temp. ToList ();
String STR=res. Result. Content. ReadAsStringAsync (). The Result;
return str;
}
  •  Tags:  
  • C#
  • Related