Advertisement
Guest User

Untitled

a guest
Aug 12th, 2015
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Net.Http;
  8. using DistCalcRESTService;
  9.  
  10.  
  11. namespace RESTConsoleClient
  12. {
  13.     class Program
  14.     {
  15.         static void Main(string[] args)
  16.         {
  17.             using (WebClient client = new WebClient())
  18.             {
  19.  
  20.                 string response = client.UploadString("http://localhost:54376/dist?x1=2&y1=5&x2=6&y2=7","POST","");
  21.  
  22.                 // Write values.
  23.                 Console.WriteLine("--- WebClient result ---");
  24.                 Console.WriteLine(response);
  25.             }
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement