Rest API - HTTP Methods
Consider this JavaScript fetch code to delete a post:
What is the main issue with this code?
fetch('https://api.example.com/posts/10', {
method: 'DELETE',
body: JSON.stringify({ id: 10 })
})
.then(res => res.status)
.then(console.log)What is the main issue with this code?
