You are designing a RESTful API for an e-commerce platform. How would you structure the API endpoints to handle CRUD operations for products?
- a) /api/products/create, /api/products/read, /api/products/update, /api/products/delete
- b) /api/createProduct, /api/readProduct, /api/updateProduct, /api/deleteProduct
- c) /api/products POST, GET, PUT, DELETE
- d) /api/products, POST, GET, PUT, DELETE
In a RESTful API, CRUD operations are typically represented by HTTP methods. Option (c) follows REST conventions with POST, GET, PUT, and DELETE HTTP methods for creating, reading, updating, and deleting products.
Loading...
Related Quiz
- The algorithm that follows the 'divide and conquer' strategy is ____.
- The ____ method in generator objects is used to resume the generator and send a value back to it.
- You are assigned to optimize a Python application. Which tool would you use to profile the Python code and find the bottlenecks?
- How would you optimize the performance of a RESTful API that serves large datasets?
- To debug Python scripts, you can use the ____ module to set breakpoints and inspect variable values.