有可能吗?那该怎么做呢?
var client = new RestClient("http://localhost:58746");
var request = new RestRequest("Users/Login", Method.POST);
request.AddParameter("UserName", "user");
request.AddParameter("Password", "12345");
request.AddParameter("RememberMe", true);
request.AddParameter("ReturnUrl", "http://localhost:58746");
if (response.StatusCode == HttpStatusCode.OK)
{
var cookie = response.Cookies.FirstOrDefault(x => x.Name == FormsAuthentication.FormsCookieName); // yeah but that will not get the cookie.
}怎样才能找到那块饼干呢?
发布于 2012-11-19 23:24:59
我能够让它这样工作:
var cookie = response.Cookies.FirstOrDefault(x => x.Name == FormsAuthentication.FormsCookieName);
https://stackoverflow.com/questions/13038260
复制相似问题