What is Web API ?

ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. It is a core platform  for building a RESTful application on the ASP.NET platform.  We can use Web API With MVC and other types of web application like Asp.Net WebForms. It can also be used as an stand-alone Web services application.


Why do we use Asp.Net Web API ?

Actually, we need to have a Web API if we want to store and process our data in server and let other Application like Web Application , Mobile Application etc., request and get data from that  server if needed. These other applications can be part of your system or you can open your data for others to use.Why to choose Web API?



Why to choose Web API ?

  • It is only based on HTTP and is easy to define, expose and consume in a RESTful way.
  • If you need a Web Service , then Asp.Net Web API is the best choice.
  • It is open source.
  • It has a lightweight architecture and is the best choice if you have limited bandwidth like smart phone.
  • It’s doesn’t have expensive and tedious configuration.


Features of Web API

  • ASP.NET Web API allows you to build HTTP Services on top of the .NET Framework.
  • It supports conventional CRUD Actions since it works with HTTP verbs GET,POST,PUT and DELETE.
  • It can be hosted within the application or on IIS.
  • It has automatic support for OData (Open Data Protocol), making working with datasets over the web simpler.
  • Responses have an Accept header and HTTP status code, so debugging the whole process is a joy to the developers.
  • It may be used to accept and generate content which may not be object oriented like PDF files, images etc.