Here
in this article I am going to give you introduction of ASP.Net Web API.
ASP.NET Web API
API stands for
application programming interface. ASP.NET Web API is a framework developed by
Microsoft, which is used to build HTTP based services. It processes the
information/data between two applications and returns the data in XML or JSON
format. API can be accessed by a broad range of clients like browsers, mobile, IOT,
desktop application etc. It is an ideal platform for building RESTful services.
ASP.Net Web API features & Advantages :
- Web API is an ideal platform for building RESTful services.
- Can develop cross domain application.
- Web API has lightweight architecture and easy to use.
- It has the ability to be hosted in IIS as well as self-host outside of IIS.
- It supports full features of HTTP verbs like Get, Put, Post and Delete for all CRUD operations.
- Supports different formats of response data like XML, JSON etc. using MediaTypeFormatter.
- Support for OData
- It supports for ASP.Net MVC features like Controller, Action, Routing, dependency injection etc.
What are RESTful services?
REST stands for Representational
State Transfer. It was first presented by Roy Fielding in 2000. It is an architectural
pattern for designing loosely coupled applications over HTTP, that is often
used in the development of web services. REST architectural pattern specify the
set of 6 constraints which make any service a true RESTful API.
- Stateless
- Uniform interface
- Client-Server
- Cacheable
- Layered system
- Code on demand
Following HTTP methods
are most commonly used in a REST based architecture.
GET : Used to retrieve
resource information only.
POST : Used to update existing resource or create a new resource.
PUT : Used to update existing resource.
DELETE : Used to remove/delete a resource.
POST : Used to update existing resource or create a new resource.
PUT : Used to update existing resource.
DELETE : Used to remove/delete a resource.
No comments:
Post a Comment