Building HTTP Services in ASP.NET Web API 2
Our world is becoming more connected by the minute. The explosion of smart devices is raising the bar for developers to create richer experiences for their users, and to allow them to access their data wherever they are. Web APIs provide a solution that enables HTTP-based services to be exposed in a way that makes it easier to integrate functionality with a broad variety of devices, clients, and other businesses.
ASP.NET Web API is a framework created by Microsoft that allows developers to use their existing skills to create HTTP services using the .NET Framework. It provides a rich programming model that embraces HTTP instead of trying to abstract it away. It includes powerful features such as model binding, routing, and an easily configurable pipeline.
In this course, you will be introduced to some of the fundamental concepts for building HTTP services with ASP.NET Web API. We will take a look at how to leverage HTTP constructs such HTTP verbs, headers, and status codes. We will also discuss some recommendations for API design, documentation generation, and versioning.
After completing this course, you will be able to:
- Use ApiControllers and actions to handle API requests
- Craft HTTP requests manually
- Use tools such as Postman and cURL to test your APIs
- Configure API routing using attributes or the centralized configuration
- Validate API requests before processing
- Understand how content negotiation works
- Create your own media type formatters
- Add a little Swagger to your API to generate documentation
- Use different API versioning strategies