Answers for "content disposition attachment javascript fetch download "excel""

0

content disposition attachment javascript fetch download "excel"

download(filename) {
 fetch(url , { headers })
 .then(response => response.blob())
 .then(blob => URL.createObjectURL(blob))
 .then(uril => {
 var link = document.createElement("a");
 link.href = uril;
 link.download = filename + ".csv";
 document.body.appendChild(link);
 link.click();
 document.body.removeChild(link);
 });
}
Posted by: Guest on May-07-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language