Summary
In this chapter, we took a high-level view of HTTP methods and how they are handled. We explored in further detail the way in which requests can be routed, allowing essential parameters to be lifted out of route definitions with routing parameters.
We also delved into the basics of validation, firstly by placing constraints on our API routes to ensure that the data received is formatted in an appropriate manner. Following this, we learned how to handle validation in different ways, including manual validation, and the use of data annotations in models to invoke validation in a centralized fashion within the endpoint body.
Throughout the chapter, we saw examples of how errors can be captured through validation techniques, and how informative error responses should be handed back to clients to inform their debugging strategies.
By now, you should be capable of putting together a basic yet functional minimal API project. In the next chapter, we will learn how to introduce...