public async Task<Person> UpdateAsync(long id, PersonUpdateOptions options) { using (var client = _clientFactory.Create()) using (var response = client.PutAsync(IdUrl(id), BuildJsonContent(options)).Result) using (var content = response.Content) return JsonConvert.DeserializeObject<Person>(await content.ReadAsStringAsync()); }
private static async Task Update(PersonClient client, long id, PersonUpdateOptions options) { Console.WriteLine("Update"); var person = await client.UpdateAsync(id, options); Console.WriteLine(person.ToString()); }