when i post ajax, error occurs.
these are my codes.
let xhr = new XMLHttpRequest()
let data ={
"name": "test",
"phone": "12345678",
"email": "test@test.com",
"content": "i wish"
}
let dataStr = JSON.stringify(data)
xhr.open('post',apiUrl,true) // apiUrl is provided from back side
xhr.setRequestHeader('Content-type','application/json')
xhr.send(dataStr)
it has bothered me few days,please help me.