Skip to content

Lesson 18 (Backend Documentation) #141

@sudarshan-magar7

Description

@sudarshan-magar7

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);
});
Lesson 18 Error

****

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions