I have webapi
post method which returns an integer values between 1 and 5 based on certain criteria when a call is made from a WPF
application. The api
is working well and returns status 200 when called.
Issue: I want to access the integer value returned in the response.
webapi:
[System.Web.Http.HttpPost]
public int ValidateLicence(dto_User user)
{
var result = _repository.ValidateLicence(user);
return result;
}
reponse (wpf):
var response = await client.PostAsJsonAsync("/api/User/ValidateLicence/", licence);