Unable to access response object NOT AUTHORIZED related info after Blob conversion
问题 In my react app, I am using the following approach to download a file using axios. Approach 1: axios.post('api/downloadMyFile', data, { responseType: 'blob' }) .then(blob=>{ const url = window.URL.createObjectURL(blob.data); const a = document.createElement('a'); a.href = url; a.download = "download.zip" document.body.appendChild(a); a.click(); window.URL.revokeObjectURL(url); }) Initially I was using this "Approach 2" but then had to change to "Approach 1" for the following reason: The