- the backend uses poi to generate the excel object, and through the stream output, the test code:
ServletOutputStream out = response.getOutputStream ();
wb.write(out);
out.flush();
out.close();
The - page sends requests using axios, and according to the blog, responseType: "blob" is also set
Test part of the request:
export function getExcel() {
return request({
url: `${BASE_URL}/meta_db/excel`,
method: "POST",
responseType: "blob"
})
}
- response: obtained from background
response, response.data
- JS response.data, Blob,xls
:
:
Does anyone know the solution to this problem? Thank you