Exemplo n.º 1
0
        private async void OnHttpPostRequestMyToolkit(object sender, RoutedEventArgs e)
        {
            try
            {
                var request = new HttpPostRequest(UrlBox.Text);
                request.Data.Add("Key1", "Value1");
                //request.Files.Add(new HttpPostFile(...));
                var response = await request.PostAsync();

                ResponseBox.Text = response.Response;
            }
            catch (OperationCanceledException exception)
            {
                // Do nothing
            }
            catch (HttpStatusException exception)
            {
                // TODO: Handle exception
            }
            catch (Exception exception)
            {
                // TODO: Handle exception
            }
        }