Hey Dev, When I try to place order on Checkout page then it show the error in console (400 Bad Request) for this API =https://supersimplebackend.dev/orders ,can you provide solution for this..
document.querySelector('.js-place-order').addEventListener('click', async ()=>{
const response=await fetch('https://supersimplebackend.dev/orders',{
method:'POST',
headers:{
'Content-Type':'application/json'
},
body: JSON.stringify({
cart: cart
})
});
const order= await response.json();
console.log(order);
});
Hey Dev, When I try to place order on Checkout page then it show the error in console (400 Bad Request) for this API =https://supersimplebackend.dev/orders ,can you provide solution for this.. document.querySelector('.js-place-order').addEventListener('click', async ()=>{ const response=await fetch('https://supersimplebackend.dev/orders',{ method:'POST', headers:{ 'Content-Type':'application/json' }, body: JSON.stringify({ cart: cart }) }); const order= await response.json(); console.log(order); });
****