[ ] Use POST method using the url http://localhost:8000//products/id:/like to like a product and check for 200 reponse
[ ] Use DELETE method using the url http://localhost:8000//products/id:/like to like a product and check for 204 reponse
[ ] Use GET method using the url http://localhost:8000//products/liked to retrieve a list of liked products and check for 200 reponse and for a list of liked products
Creates the ability to like and dislike a product as well as retrieve a list of liked products
Changes
/models/ProductLikes
@action GET method
for likes to retrieve the liked products@action POST and DELETE method
for liking and disliking a productRequest
POST
/products/id:/like
Likes a productResponse
HTTP/1.1 201 OK
Request
DELETE
/products/id:/like
dislikes/unlikes a productResponse
HTTP/1.1 204 NO CONTENT
Request
GET
/products/liked
gets liked productsResponse
HTTP/1.1 200 OK
Testing
Description of how to test code...
http://localhost:8000//products/id:/like
to like a product and check for 200 reponsehttp://localhost:8000//products/id:/like
to like a product and check for 204 reponsehttp://localhost:8000//products/liked
to retrieve a list of liked products and check for 200 reponse and for a list of liked productsRelated Issues