2

When I directly access the api in the browser address tab, it automatically downloads the file, but when using the axios get request in the application, it does not save.

I have already set-up the backend (Spring Boot) for the CSV download

I can see the response already on the developer tools but seems it was not saving the .CSV file in Downloads

Here is the response seen on the browser.

Content-Disposition: attachment; filename="2021-03-10-Calendar.csv"
Content-Type: text/csv;charset=ISO-8859-1

In the response, you can see the raw data.

Is there a way to make the response directly save the file? I use axios get request for the calling of the api.

Dan
  • 559
  • 4
  • 9
  • 23
  • 2
    The second answer (not accepted answer) is the answer you seek from this duplicate: [Save file Javascript with file name](https://stackoverflow.com/questions/7717851/save-file-javascript-with-file-name) – Randy Casburn Mar 10 '21 at 04:33

0 Answers0