I'm trying to build a RESTful API with DNN 6.2's web services. REST calls for newly created items to be called with a PUT verb.
I'm using my router to send this to the correct function. This works just fine:
routeManager.MapRoute(
"Revolution/Engine"
,
"{controller}/{id}"
,
new
{ controller =
"TriggerPoints"
, action =
"UpdateTriggerPoint"
, },
new
{ httpMethod =
new
HttpMethodConstraint(
"PUT"
) },
new
[] {
"Engine"
});
When my UpdateTriggerPoint is fired, I'm having an issue:
[ValidateInput(
false
)]
[AcceptVerbs(HttpVerbs.Put)]
public
ActionResult UpdateTriggerPoint(Models.TriggerPoint triggerPoint)
{
if
(ModelState.IsValid)
{
// save to database here
// problem: triggerPoint only contains empty values!
}
return
Json(
true
);
}
The data is nowhere to be seen once the function hits. How does one read the contents of a PUT verb with the new web services framework?