예제 #1
0
 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());
 }
예제 #2
0
 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());
 }