#API #C# #ASP.NET
What is an API?
API stands for Application Programming Interface. API is some kind of interface which has a set of functions that allow programmers to access specific features or data of an application, operating system or other services using HTTP protocol.When to choose ASP.NET Web API?
- If you are using .NET framework 4.0 or above.API is built on top of ASP.NET.
- If you want to build a service that supports only HTTP protocol.
- To build RESTful HTTP based services.
- If you are familiar with ASP.NET MVC.
- Uses routing and controller concept similar to ASP.NET MVC.
API Features
- It works with HTTP verbs GET,POST,PUT and DELETE.
- Responses have an Accept header and HTTP status code.
- Supports multiple text formats like XML, JSON or you can use your custom MediaTypeFormatter.
- Supports Self-hosting or IIS Hosting.
- IHttpActionResult return type.
- Support for Cross-Origin requests using CORS.
Tags
Asp.Net Web Api