Building HTTP APIs
In this section, we will begin with ASP.NET Core's standard approach for creating HTTP APIs. Then we will see how ABP can automatically convert standard application services to HTTP API endpoints. But first, let's see how we can create API-only solutions with ABP Framework.
Creating an HTTP API project
When you create a new application or module with ABP Framework's startup solution templates, it already contains HTTP APIs for all the functionality provided by the application. However, it is also possible to create an HTTP API endpoint without an application UI if you want to.
You can use the -u none
parameter when you create a new solution using ABP Framework, as shown in the following example:
abp new ApiDemo -u none
ApiDemo
is our solution name here. In this way, we have a solution with an HTTP API endpoint but without a UI. The following figure shows the solution opened in Visual Studio: