Closed dhanajeane79 closed 1 year ago
DOD: Understand Endpoints
URL Format: ${BASE_URL}/${ROUTE}/ ?/${ROUTE_ID} ?/${CATEGORY} ?/${ITEM_TYPE} ?{QUERY}
Post Endpoints:
${BASE_URL}/products
// POST-URL to add product ${BASE_URL}/users/
// POST-URL to add user ${BASE_URL}/cart/
// POST-URL to add cart ${BASE_URL}/auth/login
// POST-URL to login userGET Endpoints:
//Routes: (What I think would logically make routes/pages)
- `${BASE_URL}/products` // Get all products
- `${BASE_URL}/products/:productId` // Get product by id
- `${BASE_URL}/carts/:cartId` // Get cart by id *Protect*
- `${BASE_URL}/users/:userId` // Get user by id *Protect*
Patch/Put Endpoints:
${BASE_URL}/products/:productId
// Modify or replace existing product by id${BASE_URL}/carts/:cartId
// Modify or replace existing cart by id${BASE_URL}/users/:userId
// Modify or replace existing user by idDelete Endpoints: Protect
${BASE_URL}/products/:productId
// Delete product by id${BASE_URL}/carts/:cartId
// Delete cart by idComplete
Read through Fake Store API to get an understanding of what info is provided