|
63 | 63 | "stock": 10 |
64 | 64 | }' |
65 | 65 |
|
66 | | - > {"id":1,"name":"product1","price":10.99,"stock":10} |
| 66 | + # > {"id":1,"name":"product1","price":10.99,"stock":10} |
67 | 67 | ``` |
68 | 68 |
|
69 | 69 | #### Get all products: |
|
73 | 73 | $ curl --request GET \ |
74 | 74 | --url http://localhost:3000/api/v1/product |
75 | 75 |
|
76 | | - > [{"id":1,"name":"product1","price":10.99,"stock":10}] |
| 76 | + # > [{"id":1,"name":"product1","price":10.99,"stock":10}] |
77 | 77 | ``` |
78 | 78 |
|
79 | 79 | #### Get a product by id: |
|
83 | 83 | $ curl --request GET \ |
84 | 84 | --url http://localhost:3000/api/v1/product/1 |
85 | 85 |
|
86 | | - > {"id":1,"name":"product1","price":10.99,"stock":10} |
| 86 | + # > {"id":1,"name":"product1","price":10.99,"stock":10} |
87 | 87 | ``` |
88 | 88 |
|
89 | 89 | #### Update a product by id: |
|
99 | 99 | "stock": 5 |
100 | 100 | }' |
101 | 101 |
|
102 | | - > {"id":1,"name":"a product","price":8.99,"stock":5} |
| 102 | + # > {"id":1,"name":"a product","price":8.99,"stock":5} |
103 | 103 | ``` |
104 | 104 |
|
105 | 105 | #### Delete a product by id: |
|
109 | 109 | $ curl --request DELETE \ |
110 | 110 | --url http://localhost:3000/api/v1/product/1 |
111 | 111 |
|
112 | | - > {"id":1,"name":"a product","price":8.99,"stock":5} |
| 112 | + # > {"id":1,"name":"a product","price":8.99,"stock":5} |
113 | 113 | ``` |
0 commit comments