Closed dvt32 closed 1 month ago
Instead of having endpoints like /movies/list & /movies/add, endpoints' name should be something like /movies, /movies/{id} with the appropriate HTTP method (GET, POST, PUT, DELETE) deciding what happens when the endpoint is used.
/movies/list
/movies/add
/movies
/movies/{id}
You can see some REST API best practices here: https://www.freecodecamp.org/news/rest-api-best-practices-rest-endpoint-design-examples
Done
Instead of having endpoints like
/movies/list
&/movies/add
, endpoints' name should be something like/movies
,/movies/{id}
with the appropriate HTTP method (GET, POST, PUT, DELETE) deciding what happens when the endpoint is used.You can see some REST API best practices here: https://www.freecodecamp.org/news/rest-api-best-practices-rest-endpoint-design-examples