1

Closed

New [FromBody] attribute in RC

description

I read Mike's blog post at http://blogs.msdn.com/b/jmstall/archive/2012/04/16/how-webapi-does-parameter-binding.aspx (thanks Kiran!) so I understand the rationale behind this change to use the [FromBody] attribute for parsing out parameters. However, I think this is going to have a heavy customer impact as a silent breaking change from Beta to RC. Case in point, if you have any JavaScript that uses $.post and specifies data, or if you're using the request library in node, you will just silently fail once you upgrade to RC. This is just a tracking item so that we doc this very clearly for folks who upgrade.

Updating our template to actually show some examples using $.post might be a potential idea in addition to making this breaking change well known - took me completely by surprise and there's no easy way to debug.
Closed Jul 6, 2012 at 10:55 PM by bhaveshc
Our template has been updated to include [FromBody] for action parameters in ValuesController.

comments

HongmeiG wrote May 14, 2012 at 10:22 PM

We should document this breaking change clearly.

HongmeiG wrote Jun 1, 2012 at 11:52 PM

Our template will show FromBody attribute in the Post method, which got fixed recently.