Пример #1
0
 private void buttonThreaded_Click(object sender, EventArgs e)
 {
     var request = new HttpRequest(this.textboxUrl.Text);
     request.OnSuccessfulRequest += (result) =>
     {
         textBoxSource.Text = result.Body;
     };
     request.OnFailedRequest += (exc) =>
     {
         textBoxSource.Text = exc.Message;
     };
     request.MakeThreadedRequest();
 }
Пример #2
0
 private void buttonUnthreaded_Click(object sender, EventArgs e)
 {
     var request = new HttpRequest(this.textboxUrl.Text);
     var result = request.MakeUnthreadedRequest();
     textBoxSource.Text = result.Body;
 }