Can ASP.NET Core WebAPI Actions have void return types?

ASP.NET Core WebAPI actions CAN have void return types. The framework returns an EmptyResult for such actions with a default 200 (OK) status Code.

This can be particularly observed in the cases of HttpDelete operations where no return is expected by the client in most cases.

ASP.NET Core Posted Jul 06, 2021

You can now show your support. 😊

We use cookies to provide you with a great user experience, analyze traffic and serve targeted promotions.   Learn More   Accept