Published
- 1 min read
set post limit on jsonplaceholder
The solution for this is noted below
set post limit on jsonplaceholder
Solution
fetch('https://jsonplaceholder.typicode.com/posts?_page=1&_limit=2').then(async (response) => {
const link = response.headers.get('link') // link to next page (REST)
const json = await response.json() // data payload
console.log(link, json)
})
Try other methods by searching on the site. That is if this doesn’t work