This is my snippet:
using (HttpClient client = new HttpClient())
{
Task<HttpResponseMessage> task = client.GetAsync(<Some url>);
task.ContinueWith(t =>
{
if (t.IsCanceled)
{
// always true
return;
}
});
}
What I don't undersatnd is why cancellation is always fired whatever the url I am using. Of course the target is not invoked.
What is wrong?
Aucun commentaire:
Enregistrer un commentaire