Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- var response = new HttpClient().PostAsync("http://localhost/myservice",
- new StringContent("{ "type": "confirmation" }", Encoding.UTF8, "application/json"))
- .Result;
- Console.WriteLine(response.StatusCode);
- }
- }
- var client = new RestClient("http://localhost/myservice");
- var request = new RestRequest("api") { Method = Method.POST };
- request.AddJsonBody(new { type = "confirmation" });
- var response = client.Execute(request);
Add Comment
Please, Sign In to add comment