首页 > 解决方案 > Can't access Content-Disposition in axios

问题描述

I have a React JS application where I send a GET request with axios. In the browser, in the Response Headers section, when I send the request I get Content-Disposition: attachment;filename="image123.pdf", but when I try to get this in React, I don't get any field with this name. So when I try to access the response.headers['content-disposition'], I don't get anything.

Is it possible to read this header key using React JS using axios?

标签: reactjsaxios

解决方案


推荐阅读