Restsharp su WP 7.1 aggiungendo i cookie
-
27-10-2019 - |
Domanda
Sto tentando di aggiungere un cookie a una richiesta utilizzando RestSharp ma in fiddler2 non vedo il cookie nella richiesta e la chiamata di servizio non riesce.C'è qualche trucco per aggiungere un cookie a RestRequest?
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 });
});
Grazie, Al
Soluzione
RestSharp ha un bug su Windows Phone durante l'aggiunta di cookie a RestRequest!
Ho risolto il problema e ho una richiesta pull in attesa che si integrino nelramo principale.
Per ora, puoi risolvere questo problema utilizzando AddHeader ("Cookie", cookieValuesString) ...
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow