I have created ASP.NET Web API and calling the post method using json from client side and it's working fine :
public class ValueController : ApiController
{
public void Post([FromBody]model value)
{
}
}
public class model
{
public decimal value { get; set; }
}
string JSONString = "{\"value\":\"999.99\"}";
but when I use the [Required] attribute in the value property,
public class model
{
[Required]
public decimal value { get; set; }
}
it's start giving protocol Error when call the GetResponse() method..