How can we call the following web api ?
[HttpPost]
public bool ValidateAdmin(string username, string password)
{
return _userBusinessObject.ValidateAdmin(username, password);
}
I've written the following code, but it dosen't work 404 (Not Found)
string url = string.Format("api/User/ValidateAdmin?password={0}", password);
HttpResponseMessage response = Client.PostAsJsonAsync(url, username).Result;
response.EnsureSuccessStatusCode();
return response.Content.ReadAsAsync<bool>().Result;
Edit:
I'm dead sure about the Url, but it says 404 (Not Found)