Code Snippet Copied
const token = document.getElementById("token");
const data = {
case_id: document.getElementById("case_id"),
status: document.getElementById("status"),
subject: document.getElementById("subject"),
description: document.getElementById("description"),
copiedFromUrl: document.getElementById("copiedFromUrl"),
infringingUrl: document.getElementById("infringingUrl"),
infringingSiteIp: document.getElementById("infringingSiteIp"),
priority: document.getElementById("priority")
};
fetch("https://api.dmca.com/updateCase", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Token": token,
},
body: JSON.stringify(data),
})
.then((response) => response.json())
.then((data) => {
console.log(data.d);
})
.catch((error) => {
console.error("Error: ", error);
});