When downloading sensitive files that require authentication headers or dynamically generated reports, you must fetch the file data as a and trigger the download manually.
Use URL.createObjectURL(response.data) to create a temporary browser link to the downloaded data.
Use URL.revokeObjectURL() to free up system memory once the download starts. Enhancing User Experience with Progress Bars