How to download files using axios.post in React using webapi Core

人走茶凉 提交于 2020-01-06 04:41:10

问题


I have used this How to download files using axios.post from webapi (It could be duplicate of this) to work on this scenario but i am not getting success.

 React: 
   axios.post("URL",{data:data, responseType: "blob"})
  1. In response i am getting corrupted data, not bytes.
  2. ResponseType works with get request but why not with post?

WebAPI Core: return File(arraybytes, "application/vnd.openxmlformats- officedocument.spreadsheetml.sheet", "test.xlsx");

来源:https://stackoverflow.com/questions/55901499/how-to-download-files-using-axios-post-in-react-using-webapi-core

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!