Restsharp en WP 7.1 agregando cookies
-
27-10-2019 - |
Pregunta
Estoy intentando agregar una cookie a una solicitud usando RestSharp pero en fiddler2 no veo la cookie en la solicitud y la llamada de servicio falla.¿Existe algún truco para agregar una 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 });
});
Gracias, Al
Solución
¡RestSharp tiene un error en Windows Phone al agregar cookies a RestRequest!
Resolví el problema y tengo una solicitud de extracción esperando a que se integren alrama principal.
Por ahora, puede solucionar este problema utilizando AddHeader ("Cookie", cookieValuesString) ...
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow