DEV Community

FOLASAYO SAMUEL OLAYEMI
FOLASAYO SAMUEL OLAYEMI

Posted on

What Is the Idea Behind the ASP.NET Core Web API?

What is ASP.NET Core?

The open-source and cross-platform version of the well-known web development framework ASP.NET for creating web applications on the .NET platform is called ASP.NET Core.

What is Web API?

Let's first examine what an API is before learning about web APIs (Application Programming Interface).

An application programming interface (API) is a collection of subroutine definitions, protocols, and tools used in computer programming to create software and applications.

API, which stands for application programming interface, is a type of interface with a collection of capabilities that enables programmers to access particular features or data of an application, operating system, or other services.

As the name implies, a web API is an API that can be accessed using the HTTP protocol. It is not a technology; it is a concept. We can build Web API using different technologies such as NodeJS, Java, .NET etc. For example, LinkedIn's REST APIs provide programmatic access to read and write data, using which we can integrate LinkedIn's capabilities into our own application.

What is ASP.NET Core Web API?

An extensible framework for creating HTTP-based services that can be accessible in various applications on various platforms, including web, Windows, mobile, etc., is the ASP.NET Core Web API. With the exception of sending data as a response rather than an HTML view, it functions essentially in the same way as an ASP.NET Core MVC web application. The only difference between it and a webservice or WCF service is that it only supports the HTTP protocol.

Screenshot of how asp.net webapi works

ASP.NET Core Web API Characteristics

  • Building RESTful services on top of the ASP.NET Core Web API is highly recommended.

  • Built on top of ASP.NET Core, ASP.NET Core Web API supports the ASP.NET Core request/response pipeline.

  • Different return data types are supported by the ASP.NET Core Web API. JSON, XML, and BSON format support is built-in.

  • ASP.NET Core Web API maps HTTP verbs to method names.

  • ASP.NET Core Web API can be hosted in IIS, Self-hosted or other web server that supports .NET 4.0+.

  • ASP.NET Core Web API framework includes new HttpClient to communicate with Web API server. HttpClient can be used in ASP.NET Core MVC server side, Windows Form application, Console application or other apps.

Thanks for reading...
Happy Coding!

Top comments (0)