File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
module3-crud-and-data-models/r1-schema-and-data-models Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,17 @@ Note: Use `POST` when you want to add a child resource under resources collectio
63
63
64
64
` POST http://www.myrestaurant.com/api/dishes/ `
65
65
66
- We will need to send the dish data too.
66
+ We will need to send the dish data too as an object.
67
+
68
+ For example
69
+
70
+ ``` js
71
+ {
72
+ title: " Lasagna" ,
73
+ image: " www.food.com/lasagna.jpg" ,
74
+ tags: [" simple" , " classic" ]
75
+ }
76
+ ```
67
77
68
78
#### Read
69
79
@@ -86,6 +96,18 @@ Note: Use `PUT` when you want to modify a singular resource which is already a p
86
96
87
97
` PUT http://www.myrestaurant.com/dishes/:id `
88
98
99
+ We will need to send the new dish data too as an object.
100
+
101
+ For example
102
+
103
+ ``` js
104
+ {
105
+ title: " New dish title" ,
106
+ image: " www.food.com/dish.jpg" ,
107
+ tags: [" simple" , " classic" ]
108
+ }
109
+ ```
110
+
89
111
#### Delete
90
112
91
113
The CRUD operation Delete corresponds to the HTTP method DELETE. It is used to remove a resource from the system.
You can’t perform that action at this time.
0 commit comments