Skip to content

Commit 5542d06

Browse files
committed
add data to post and put CRUD reqs
1 parent 5178fc6 commit 5542d06

File tree

1 file changed

+23
-1
lines changed
  • module3-crud-and-data-models/r1-schema-and-data-models

1 file changed

+23
-1
lines changed

module3-crud-and-data-models/r1-schema-and-data-models/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,17 @@ Note: Use `POST` when you want to add a child resource under resources collectio
6363

6464
`POST http://www.myrestaurant.com/api/dishes/`
6565

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+
```
6777

6878
#### Read
6979

@@ -86,6 +96,18 @@ Note: Use `PUT` when you want to modify a singular resource which is already a p
8696

8797
`PUT http://www.myrestaurant.com/dishes/:id`
8898

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+
89111
#### Delete
90112

91113
The CRUD operation Delete corresponds to the HTTP method DELETE. It is used to remove a resource from the system.

0 commit comments

Comments
 (0)