Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions templates/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,29 @@ fetch('https://jsonplaceholder.typicode.com/posts?userId=1')
.then(json => console.log(json))
```

Pagination filtering is supported through query parameters.

```js
// Will return the posts that id from 11 to 20 that belong to the first user
fetch('https://jsonplaceholder.typicode.com/posts?_start=10&_limit=10')
.then(response => response.json())
.then(json => console.log(json))
```

Array param filtering is supported through query parameters.

```js
// Will return the posts that belong to the users id in(2,5,10,12)
fetch('https://jsonplaceholder.typicode.com/posts?userId=2&userId=5&userId=10&userId=12')
.then(response => response.json())
.then(json => console.log(json))

// Will return the posts that id in(2,5,10,12)
fetch('https://jsonplaceholder.typicode.com/posts?id=2&id=5&id=10&id=12')
.then(response => response.json())
.then(json => console.log(json))
```

### Nested resources

One level of nested route is available.
Expand Down