Skip to content
This repository was archived by the owner on Aug 6, 2021. It is now read-only.

Commit 55e6de3

Browse files
committed
Added a simple example
1 parent e9d4e2d commit 55e6de3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ Ember Data expects the JSON responses from the API to follow certain conventions
1919
Some of these conventions are mentioned in the [Ember model guide](http://emberjs.com/guides/models/connecting-to-an-http-server/).
2020
However, there is a more [complete list of expected responses](https://stackoverflow.com/questions/14922623/what-is-the-complete-list-of-expected-json-responses-for-ds-restadapter) on Stackoverflow.
2121

22+
As a **quick example**, if you create a `post` model under the namespace `api/v1` you can access the model under `localhost:1337/api/v1/posts` and to create a new Record send a POST request using the following JSON:
23+
24+
```js
25+
{
26+
"post": {
27+
"title": "A new post"
28+
"content": "This is the wonderful content of this new post."
29+
}
30+
}
31+
```
32+
2233

2334

2435
# Getting started

0 commit comments

Comments
 (0)