Skip to content

Commit 73e3631

Browse files
committed
Update README.md
Doc updated after the single object POST response format change.
1 parent 3453540 commit 73e3631

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,19 @@ Making a POST to the resource that we want (fighters in this case) with the `"Co
4848
curl -H "Content-Type: application/json" -X POST -d '{"name": "Chuck Norris", "style": "Karate"}' http://localhost:8000/api/fighters
4949
```
5050

51-
And it returns a JSON array with a JSON object with an ID autogenerated:
51+
And it returns a JSON object with an ID autogenerated:
5252

5353
```json
54-
[
55-
{
56-
"style":"Karate",
57-
"name":"Chuck Norris",
58-
"id":1
59-
}
60-
]
54+
{
55+
"style":"Karate",
56+
"name":"Chuck Norris",
57+
"id":1
58+
}
6159
```
6260

6361
This will create a `db` folder in your working directory and a `fighters` directory inside with a file called `1`.
6462

65-
We can also insert fighters in bulk by using a JSON array:
63+
We can also **bulk insert** a bunch of fighters by using a JSON array:
6664

6765
```bash
6866
curl -H "Content-Type: application/json" -X POST -d '[{"name": "Bruce Lee", "style": "Kung Fu"}, {"name": "Rocky Balboa", "style": "Boxing"}]' http://localhost:8000/api/fighters

0 commit comments

Comments
 (0)