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

fix: loosing request header (#4858) #4871

Merged
merged 2 commits into from Sep 26, 2022

Conversation

WillianAgostini
Copy link
Contributor

@WillianAgostini WillianAgostini commented Jul 21, 2022

Fixes #4858

As described by #4858 there are problems that was loosing request headers.

Fix the error when pass headers parameters from class.

class Header {};
let myHeaders = new Header();
myHeaders["X-Foo"] = "bar";
myHeaders["X-Test"] = "test";
myHeaders["X-Time"] = Date.now();
  
axios.post('http://cors-test.appspot.com/test', { name: 'foo' }, { headers: myHeaders })
.then((res) => {
       console.log('res---',res.config.headers);
 })

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

Successfully merging this pull request may close these issues.

None yet

2 participants