我正在使用restsharp库执行请求,但是一些网站返回给我,我正在使用的浏览器中的cookie无效...
var url = @"https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=13&ct=1535717589&rver=6.7.6640.0&wp=MBI_SSL&wreply=https%3a%2f%2foutlook.live.com%2fowa%2f%3fnlp%3d1%26RpsCsrfState%3d690f01d3-bd82-8c96-aa72-c30f2303ce0c&id=292841&CBCXT=out&lw=1&fl=dob%2cflname%2cwld&cobrandid=90015";
var cliente = new RestClient();
cliente.CookieContainer = Cookies.Cookies; //re-use cookies
var request = new RestRequest(url, Method.GET);
cliente.Execute(request);
响应
We can't sign you in
Your browser is currently set to block cookies. You need to allow cookies to use this service.
Cookies are small text files stored on your computer that tell us when you're signed in. To learn how to allow cookies, check the online help in your web browser.