Generating a response of different types

So far, all the of action methods we have created returned simple response types, such as string or arrays, but the HTTP standard has no concept of method signature and return type. Instead, it defines the format of a valid HTTP response. This is how a simple HTTP response might look:

As you can see, the HTTP response includes Status Code, Headers, and Body. Each of these parts allows you to communicate pieces of information to the client, and ASP.NET Core provides the glue that converts the results of your action methods into those parts of the HTTP response, regardless of whether they are executed successfully, or completed with a failure.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.173.199