Question

Je suis en train d'ajouter un cookie à une demande en utilisant RestSharp mais Fiddler2 je ne vois pas le cookie dans la demande et le service appel échoue. Y at-il une astuce pour ajouter un cookie au 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 });
        });

Merci, Al

Était-ce utile?

La solution

scroll top