You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
The question is: When the return value from a method is void or task, what should be the default behavior.
In MVC5 it got converted to a no op (or Empty Result). In MVC 6 we currently convert it to a 204 result, that is controlled by the formatters. A user can return an EmptyResult, write a filter, or change the formatters to work around it.
This was an explicit design choice and not a bug. We can revisit this decision.
I think that's a separate question - what to do when you return void or Task. If I return EmptyResult from my action, I'd expect it to return 200 (or basically do nothing).
See Mvc 5: https://aspnetwebstack.codeplex.com/SourceControl/latest#src/System.Web.Mvc/EmptyResult.cs. Today it sets the status code to 204.
The text was updated successfully, but these errors were encountered: