Books
Examples of requests
-
Check if the service is up and running
curl --location --request GET 'http://localhost:8080/health'
-
Add a book
curl --location --request POST 'http://localhost:8080/books' \ --header 'Content-Type: application/json' \ --data-raw '{ "title": "The Catcher in the Rye", "author": "Jerome David Salinger", "publish_year": 1951 }'
-
Get all books
curl --location --request GET 'http://localhost:8080/books'
-
Get one book (Don't forget to replace {BOOK_ID} with a real id of a book)
curl --location --request GET 'http://localhost:8080/books/{BOOK_ID}'