Ejemplo n.º 1
0
        public async Task PostPlace(PlaceImage place)
        {
            var uri     = new Uri(String.Format("https://td-api.julienmialon.com/places", string.Empty));
            var json    = JsonConvert.SerializeObject(place);
            var content = new StringContent(json, Encoding.UTF8, "application/json");

            HttpResponseMessage response = await client.PostAsync(uri, content);

            if (response.IsSuccessStatusCode)
            {
                string res = await response.Content.ReadAsStringAsync();
            }
            else
            {
                Debug.WriteLine(response.StatusCode.ToString() + response.RequestMessage);
            }
        }