请参阅WP 7.1添加cookie
本文关键字:添加 cookie WP 请参阅 | 更新日期: 2023-09-27 17:58:56
我试图使用RestSharp向请求添加cookie,但在fiddler2中,我在请求中看不到cookie,服务调用失败。在RestRequest中添加cookie有什么诀窍吗?
RestRequest rq = new RestRequest(LTV.NowNext(), Method.GET);
rc.AddDefaultParameter(LTV.cookie.Key, LTV.cookie.Value, ParameterType.Cookie);
rc.ExecuteAsync<LTV.nowNext>(rq, (response2) =>
{
if (response2.Data == null)
return;
foreach (LTV.channel channel in response2.Data.channels)
this.Items.Add(new ItemViewModel() { LineOne = channel.name, LineTwo = channel.showing[0].content[0].parent.title, LineThree = channel.showing[1].content[0].parent.title });
});
谢谢,Al
RestSharp在向RestRequest添加cookie时在Windows Phone上有一个错误!
我解决了这个问题,并有一个pull请求等待他们集成到主分支。
目前,您可以通过使用AddHeader("Cookie",cookieValuesString)来克服这个问题。。。