Giter VIP home page Giter VIP logo

Comments (7)

zok2 avatar zok2 commented on July 20, 2024

request.interceptors.response.use((response) => {
console.log(response);
console.log(response.headers.get('authorization'));
return response;
});

解决了吗? 我也获取不到headers

from umi-request.

chenjsh36 avatar chenjsh36 commented on July 20, 2024

参照案例response interceptor;使用response.headers.append时错误提示read property 'headers' of undefined

提示 read property 'headers' of undefined 应该是 response 没有返回,麻烦提供下 demo 仓库,正常是可以获取到的,但是存在部分浏览器处于保护策略禁止对 response header 做修改的情况

from umi-request.

webxiaobian avatar webxiaobian commented on July 20, 2024

I followed the documentation to get response.headers, but an empty object was returned

from umi-request.

webxiaobian avatar webxiaobian commented on July 20, 2024

I followed the documentation to get response.headers, but an empty object was returned

Then I used axios and it works fine

from umi-request.

ruizhang-chowbus avatar ruizhang-chowbus commented on July 20, 2024

I encountered the same problem

from umi-request.

ruizhang-chowbus avatar ruizhang-chowbus commented on July 20, 2024

image

from umi-request.

YuGe avatar YuGe commented on July 20, 2024

@chenjsh36 Could you reopen it? I've the same issue.

from umi-request.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.