What should be the return type of WEB API Action Method?
<p>I am developing ASP.NET Web API using .NET Core. This Web API is going to be mainly accessed by UI application (UI will be developed using ASP.NET Core MVC) but in future API may be accessed by other applications as well.</p>

<p>In my WEB API all methods are async. </p>

<p>If I want client to do content negotiation then what should be the return type of the API action method <code>Task&lt;IActionresult&gt;</code> or <code>Task&lt;SomePOCO&gt;</code>  </p>

<p>If I want method to always return data in JSON format then what should be return type of the API action method? Should it be <code>Task&lt;IActionResult&gt;</code> or <code>Task&lt;JsonResult&gt;</code> or <code>Task&lt;SomePOCO&gt;</code> because I think all 3 would work so not sure which one is appropriate here?</p>