How Can I Send Post Request In Js ?
I tried :
fetch(window.location.href,{
method: 'POST',
body: JSON.stringify(''),
headers :{
'Content-Type': 'application/json',
'X-CSRFToken': '{{ csrf_token }}'
},
})
but its shows 404
i use django as backend . should i define a different url for post instead using one url for get and post ?