DEV Community

loading...

Discussion on: Create an awesome JS API interface using Fetch (in less than 50 lines)

Collapse
aleksandar874 profile image
aleksandar87

create,
read,
update,
delete

instead of

get,
create,
update,
remove

Collapse
eaich profile image
Eddie Author

Read is a great alternative instead of get. Unfortunately, "delete" is a reserved keyword in JavaScript.

Collapse
aleksandar874 profile image
aleksandar87

I do it similarly on my daily job.

Simplified structure:

book/
create
read
update
delete

books/
available
availableByType
specific

Thread Thread
eaich profile image
Eddie Author

Oh I see. Yes, that's a good solution too. Thanks for sharing.