In this tutorial, we will implement API related topics in .NET Core 5. We start the training with a real project that has a server and client–side. The two sections communicate via the API. In this tutorial, we will cover important issues and avoid issues that you know about.
On the Server–side, we implement the ApiConntrollers, methods such as Post, PUT, Get and Delete. We can also authenticate users using JWT (JSON WEB Token). We also implement how to save photos or files via the API. We will also implement things like Paging, Response, and Memory Caching, Validation, Repositories Login, and Register API. In addition, we can change the header for HTTP and put information that we use in the client section.
In contrast on the Client–side, we create a project with a news template. And we will receive and send information from the server through the API. To do this, we receive the token from the server at login time, then store it in the client and send it to the APIs along with the requests. Also, on the Client–side, we have a section for managing information, which is Authorized so that unauthorized users cannot manipulate the information. Finally, for all APIs, we use Swagger to create documentation that is important to developers.
Specification: Web API in ASP.NET Core 5 with a real project