Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get the value of Content-Type #6285

Open
Elssia opened this issue Mar 8, 2024 · 0 comments
Open

Unable to get the value of Content-Type #6285

Elssia opened this issue Mar 8, 2024 · 0 comments

Comments

@Elssia
Copy link

Elssia commented Mar 8, 2024

Describe the bug

The header in the axios request interceptor cannot be obtained through the object dot syntax

To Reproduce

No response

Code snippet

let headers = Object.keys(config.headers)  //config.headers -》interceptors.request.use 
    headers.forEach((key)=>{
        console.log(config.headers[key]);
    })

Expected behavior

Get the value of Content-Type "applicat/json"

Axios Version

1.6.7

Adapter Version

No response

Browser

chrome

Browser Version

121

Node.js Version

21

OS

windows11

Additional Library Versions

No response

Additional context/Screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant