fetch( url, {
method: 'POST',
headers: new Headers({
'Content-Type': 'application/x-www-form-urlencoded',
'Cache-Control': 'no-cache'
}),
credentials: 'same-origin',
body: new URLSearchParams({
action: 'ty_questgo',
}),
}).then(response => response.json())
.then(response => console.log(response))
.catch(err => console.log(err));