https://i.sstatic.net/RbjJ8.png
If you need to download a file from an endpoint that returns a file response, you can do so using the following code:
const newBlob = new Blob([response], { type: "text/csv" })
const data = window.URL.createObjectURL(newBlob);
const link = document.createElement("a");
link.href = data;
link.download = fileName; // specify a name for the file
link.click();