By default, ASP.NET Core will return JSON from action methods.
Let's get the code from the previous recipe, and let's see the result from GetAllProducts:
We get JSON values, because by default, ASP.NET Core doesn't take into account the Accept header the browser sent.