let obj = JSON.stringify(payload);
console.log(obj);
fetch('/dview8/api/report/export', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: obj,
responseType:'blob'
})
.then(res => res.blob())
.then(data => {
console.log(data);
let blobUrl = window.URL.createObjectURL(data);
const a = document.createElement('a');
a.style.display = 'none';
a.download = this.state.fileName;
a.href = blobUrl;
a.click();
a.remove();
});
}