September 2016
Intermediate to advanced
247 pages
5h 51m
English
© Paul Redmond 2016
Paul Redmond, Lumen Programming Guide, 10.1007/978-1-4842-2187-7_4
Paul Redmond1
(1)Phoenix, Arizona, USA
In this chapter, we will focus on writing our first API resource: /books. We will take this in small chunks and test it as we go. At the end of the next few chapters we will have a fully-tested /books resource doing basic CRUD operations. The /books resource will look like this:
Basic REST /books Resource
GET /books Get all the booksPOST /books Create a new bookGET /books/{id} Get a bookPUT /books/{id} Update a bookDELETE /books/{id} Delete a book
The first order of business to create a BooksControllerTest class and write your first failing test. You will then write the minimum ...
Read now
Unlock full access