Answer the question
In order to leave comments, you need to log in
Correct URI acc. with REST API?
Hello! :)
The shops have books. POST BOOK: /shops/{shopId}/books
<- everything is clear here
How the URI for deleting a book from the database will look right (according to REST):
1) DELETE BOOK: /shops/{shopId}/books/{bookId}
<- extra id (shopId), but the URI shows the structure
2) DELETE BOOK: /books/{bookId}
<- nothing extra in the URL, but different from the POST request See above
How to make this URL correct? Is the extra id in the URI critical?
Thank you! :)
Answer the question
In order to leave comments, you need to log in
I understand that the book is received at the address via GET
In this case, the deletion will be at the same address, but via DELETE
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question