Summary

In this chapter, we learned about several topics ranging from routing to Vapor Models to RESTful controllers. By now you should have a good understanding of how to create routes in Vapor applications and how to handle the requests to those routes. You should also be comfortable with the three different ways you can respond to a request, which are by returning a Response object, an object that implements ResponseRepresentable protocol, and by throwing different kinds of errors. You should also be comfortable creating Vapor Models, which are like Fluent Entity but with extra functionality. You should also understand REST in more detail and know the basic commands in REST. Finally, you should be able to create a controller that is RESTful ...

Get Hands-On Full-Stack Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.