JSFiddle - React, Tailwind, and code Playground
by Shah Danial
JavaScript
var data = JSON.stringify({
"redirectUrl": "https://github.com/litkod/online-mall-admin-api/branches"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://mapi.litkod.xyz/api/v1/oauth/logout");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", ",Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiam9obm55LmJyYXZvQGdtYWlsLmNvbSIsImZ1bGxuYW1lIjoiSm9obm55IEVuZ2xpc2gifSwiaWF0IjoxNTUyMTU5MzUzLCJleHAiOjE1NTIxNjExNTN9.Z07vGYGj_VvyofRM3KSA3KmB9TGPnpI24-EQIc8i6vE");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.setRequestHeader("Postman-Token", "85bc9759-217b-4c4d-8502-5890a7325071");
xhr.send(data);