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