我试过request.AddHeader("Cookie",......,request.AddCookie和request.AddParameter("","",ParameterType.Cookie)。 ,request.AddCookie和request.AddParameter("","",ParameterType.Cookie).我试了request.AddHeader("Cookie",...,request.AddCookie)和request.AddParameter("",",ParameterType.Cookie).我嗅了嗅网状结构,Cookie没有发送。
你需要把Cookie添加到 RestRequest
对象。
var client = new RestClient("<server_url>");
var request = new RestRequest("<resource_url>", Method.GET);
request.AddCookie("cookie_name", "cookie_value");
request.AddCookie("cookie_name2", "cookie_value2");
var result = client.Execute(request);