
Learn to design, code, document, and test robust restful APIs in C# with ASP.NET Core, using postman and FTP client to consume third party services, with validation and error handling.
Plan version 2 of the API to support course-based student management, including listing, retrieving, adding, updating, and deleting students, and uploading or deleting a student id image.
Write and test an API client using the http client class, implement robust exception handling, and build unit tests with mstest and fluent assertions through test-driven development.
Define a public v2 API client interface for courses and students with asynchronous methods and cancellation tokens, then scaffold course models and build a stub client driven by unit tests.
Implement exception handling for a rest api client by validating 200 ok responses, handling 401 unauthorized with authorization exceptions, and wrapping calls in a try catch to raise api exceptions.
Explore add course tests for robust rest APIs in C#, ASP.NET Core, HttpClient, including valid and invalid inputs, JSON serialization, handling validation and authorization exceptions, and API v2 routing.
Learn validation error handling for robust rest APIs by deserialising a 422 response, collecting per-property errors, and throwing a validation exception in the api client.
Hello fellow .NET Developers! Welcome to this course about creating and consuming RESTful APIs.
RESTful APIs are an important way in which applications expose functionality to the other applications. Being able to build your own professional API for other companies to consume, or to build your own professional API client to consume other companies' APIs is an important and marketable skill.
In the first part of this course, we will learn what a RESTful API is and design one to manage Course and Student data.
In the next part of this course, we will build and thoroughly test this RESTful API. We will go beyond the basics to ensure that the API is of high quality so that other developers can reliably call it. We do this by ensuring proper error handling, boundary condition handling, thorough testing, and documentation generation. Along the way we will use ASP.NET Core to create the RESTful API, Swagger to view the fully documented API, and Postman to test it.
In the final part of this course, we will write a professional and robust API client to consume our RESTful Courses API. As before, we will go beyond the basics to ensure it can be easily and reliably be incorporated into any .NET application. We do this by ensuring proper error handling, boundary condition handling, and thorough testing. Along the way we will use HttpClient to build our API Client using solid object-oriented programming principles and we will Unit test it using Test-Driven Development with MSTest.
Happy learning!