Üpdate response: BadRequest, reason: Bad Request, content: {"errors":[{"errorType":"validation","fieldName":"snoozeLength","message":"Snooze Length is required"},{"errorType":"validation","fieldName":"recurring","message":"Recurring is required"},{"errorType":"validation","fieldName":"snoozeCount","message":"Snooze Count is required"},{"errorType":"validation","fieldName":"time","message":"Time is required"},{"errorType":"validation","fieldName":"enabled","message":"Enabled is required"}]}
Weird right? I'm casting this class into JSON:
public class ModifyAlarm
{
public string time { get; set; }
public bool enabled { get; set; }
public bool recurring { get; set; }
public List weekDays { get; set; }
public int snoozeLength { get; set; }
public int snoozeCount { get; set; }
}
And for completeness, I've attached a screenshot of the communication in Fiddler.
I'm using postasync to try and update an alarm. This is what I'm sending:
{"time":"07:10+02:00","enabled":true,"recurring":true,"weekDays":["SUNDAY"],"snoozeLength":5,"snoozeCount":3}
and this is what I get back:
Üpdate response: BadRequest, reason: Bad Request, content: {"errors":[{"errorType":"validation","fieldName":"snoozeLength","message":"Snooze Length is required"},{"errorType":"validation","fieldName":"recurring","message":"Recurring is required"},{"errorType":"validation","fieldName":"snoozeCount","message":"Snooze Count is required"},{"errorType":"validation","fieldName":"time","message":"Time is required"},{"errorType":"validation","fieldName":"enabled","message":"Enabled is required"}]}
Weird right? I'm casting this class into JSON:
public class ModifyAlarm { public string time { get; set; } public bool enabled { get; set; } public bool recurring { get; set; } public List weekDays { get; set; }
public int snoozeLength { get; set; }
public int snoozeCount { get; set; }
}
And for completeness, I've attached a screenshot of the communication in Fiddler.
Any idea what I'm doing wrong?