Welcome to Express task with products API

GET /products

Get All products: http://rayalevinson.com/projects/119/products_api/products


POST /products

Create new product:
Set in Postman:
POST request
URL: http://rayalevinson.com/projects/119/products_api/products

Headers:
Content-Type application/json
Body -> Select: raw
Body:
{
"name": "Great Product",
"year": 2020,
"price": 1000,
"rating": 10
}
See result in the Postman's Body part section at the bottom of the screen.


GET /products/1

Get single product: http://rayalevinson.com/projects/119/products_api/products/1


PUT /products/1

Update product:
Set in Postman:
PUT request
URL: http://rayalevinson.com/projects/119/products_api/products/1

Headers:
Content-Type application/json
Body -> Select: raw
Body:
{
"name": "Product WWW",
"year": 2021,
"price": 1000,
"rating": 10
}
See result in the Postman's Body part section at the bottom of the screen.


DELETE /products/1

Delete product with id 1:
Set in Postman:
DELETE request
URL: http://rayalevinson.com/projects/119/products_api/products/1
See result in the Postman's Body part section at the bottom of the screen.


GET /products/1

Get product with id 1:
Set in Postman:
GET request
URL: http://rayalevinson.com/projects/119/products_api/products/1
See result in the Postman's Body part section at the bottom of the screen.