You cannot use window.open to do POST request to the backend service, what you could do would be use fetch function
fetch(url, {
method: "POST",
body: JSON.stringify({"reporttype" : [1,2,3,4,5]}),
headers: {"Content-Type": "application/json"}
.then(response => response.json())
.then(data => console.log(data));
You could also try using XMLHttpRequest
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
console.log(xhr.response);
}
}
xhr.open("POST", url, true);
xhr.setRequestHeader("Content-type", "application/json");
xhr.send(JSON.stringify({"reporttype" : [1,2,3,4,5]}));