dataValue = { value1: 1, value2: 2 }
const respond = await fetch( url, { method: type, body: dataValue, credentials: 'same-origin' } );
fetch(url, {
method: "POST",
body: JSON.stringify(data),
headers: {
"Content-Type": "application/json"
},
credentials: "same-origin"
})