Docsity

ASP.NET Web API: Building RESTful Applications with the .NET Framework, Lecture notes of Computer Science

Partial preview of the text

Download ASP.NET Web API: Building RESTful Applications with the .NET Framework and more Lecture notes Computer Science in PDF only on Docsity!

ASP .NET WEB API

What is Web API?

  • API – “Application Programming Interface”
  • Frameworks that makes it easy to build HTTP services
  • Platform for building RESTFUL applications on the .NET framework using ASP.NET stack
  • WCF → Care about transport flexibility
  • Web API → Care about HTTP

Why Web API?

Why Web API?

Web API Features (1)

  • Modern HTTP Programming Model
    • Access to strongly typed HTTP object model
  • Content Negotiation
    • Client and server work together to determine right format for data
    • Provide default support for JSON, XML and Form URL-encoded formats
    • We can add our own formats and change content negotiation strategy

Web API Features (2)

  • Query Composition
    • Support automatic paging and sorting
    • Support querying via the OData URL conventions
  • Model Binding and Validation
    • Combine HTTP data in POCO models
    • Data validation via attributes
    • Supports the same model binding and validation infrastructure as ASP.NET MVC

References

  • https://blogs.msdn.microsoft.com/martinkear n/2015/01/05/introduction-to-rest-and-net- web-api/