this.ConfigureClient(this.Client, this.token);
try
{
var task = await this.Client.PostAsJsonAsync(WebApiQuery.SyncAddressBook, new AddressBookXmlSync() { XmlXontent = addressBookXml });
}
catch (AggregateException ex)
{
Console.WriteLine(ex);
}
a tímto způsobem ?
this.ConfigureClient(this.Client, this.token);
var task = this.Client.PostAsJsonAsync(WebApiQuery.SyncAddressBook, new AddressBookXmlSync() { XmlXontent = addressBookXml });
task.ContinueWith(ExceptionHandler, TaskContinuationOptions.OnlyOnFaulted);
try
{
task.Wait();
var result = task.Result;
}
catch (AggregateException ex)
{
Console.WriteLine(ex);
}
Žádné komentáře:
Okomentovat