获取 URL 并获取响应数据并下载文件文件是 zip 或 excel 文件

问题描述

我需要帮助来提取响应数据并将它们保存为 gzip 文件。我对以下代码做出了反应。已成功获取 URL。我想将文件另存为 zip 或 Excel。

postman header

postman header

  .then((response) => {
    saveAs(
      new Blob([response.data],{
        type:
          "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,",}),"report.xlsx"
    );
  });

我有文件保存

import { saveAs } from "file-saver";

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)