JSFiddle - React, Tailwind, and code Playground
by cjwprostar
HTML
<html>
<head>
<meta http-equiv="Access-Control-Allow-Origin" content="*" />
</head>
<body>
<button id="go">Go</button>
</body>
</html>
JavaScript
document.getElementById('go').addEventListener('click', function(e) {
const response = fetch('http://content.warframe.com/dynamic/worldState.php', {
method: 'POST', // *GET, POST, PUT, DELETE, etc.
mode: 'cors', // no-cors, *cors, same-origin
cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached
credentials: 'same-origin', // include, *same-origin, omit
headers: {
'Content-Type': 'application/json'
// 'Content-Type': 'application/x-www-form-urlencoded',
},
redirect: 'follow', // manual, *follow, error
referrer: 'no-referrer'
})
.then(x => console.log(x))
});