const response = await axio.get({ responseType: 'arraybuffer', url, method: 'POST' }); console.log(response.data); // 正常情况这里是返回buffer console.log(response.data.data); // 现在期望这里能返回buffer 希望上述请求返回的response.data.data能接收到buffer,可以改接口,但不能改前端代码 尝试使用node实现了接口,返回json格式的数据,但没达到预期还是response.data是buffer,response.data.data是undefined router.post('/a/b.zip', async ctx => { const filePath = path.join(__dirname, ctx.req.url.replace('/a', '')); const buf = fs.readFileSync(filePath); ctx.set('Content-Type', 'application/json'); ctx.status = 200; ctx.body = { data: buf } });