Click here to Skip to main content
14,974,887 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
C#
HttpClient client = new HttpClient();
client.BaseAddress = new Uri("http://localhost:1524/");

client.DefaultRequestHeaders.Accept.Add(
    new MediaTypeWithQualityHeaderValue("application/json"));

HttpResponseMessage response = client.PostAsJsonAsync("api/Bazooka").Result;

what should be given as my Url? if my bazooka controller is in another project
Posted
Updated 19-Oct-15 20:50pm
v2
Comments
Jameel VM 21-Oct-15 17:21pm
   
which is your POST method in your Web Api?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900