Docs
You can use examples below to check how Jsonify React works.
Posts
GETGet all posts
fetch('//jsonifyreact.vercel.app/api/posts')
.then((res) => res.json())
.then((data) => console.log(data))GETGet a single post
fetch('//jsonifyreact.vercel.app/api/posts/1')
.then((res) => res.json())
.then((data) => console.log(data))GETSearch posts
fetch('//jsonifyreact.vercel.app/api/posts/search?q=mother')
.then((res) => res.json())
.then((data) => console.log(data))GETLimit and Skip posts
fetch('//jsonifyreact.vercel.app/api/posts?limit=10&skip=5')
.then((res) => res.json())
.then((data) => console.log(data))POSTAdd a post
fetch('//jsonifyreact.vercel.app/api/posts', {
method: 'POST',
// Add body data here
})
.then((res) => res.json())
.then((data) => console.log(data))PUTUpdate a post
fetch('//jsonifyreact.vercel.app/api/posts/1', {
method: 'PUT',
// Add body data here
})
.then((res) => res.json())
.then((data) => console.log(data))DELETEDelete a post
fetch('//jsonifyreact.vercel.app/api/posts/1', {
method: 'DELETE'
})
.then((res) => res.json())
.then((data) => console.log(data))