private async void CreatePerson_TouchUpInside (object sender, EventArgs e)
		{
			BTProgressHUD.Show ();

			var person = new Person (Firstname.Text, Lastname.Text);
			await _personService.StorePerson (person);
			NavigationController.PopViewController (true);

			BTProgressHUD.Dismiss ();
		}
Example #2
0
        public async Task PostPerson(Person person)
        {
            var uri = $"{BaseUrl}person/";

            var personJson = JsonConvert.SerializeObject(person);
            var content = new StringContent(personJson, Encoding.UTF8, "application/json");

            var result = await _httpClient.PostAsync(uri, content);
            var gna = result.IsSuccessStatusCode;
        }
Example #3
0
 public Task StorePerson(Person person)
 {
     return _httpHandler.PostPerson(person);
 }