Skip to content

fix: loosing request header (#4858)#4871

Merged
jasonsaayman merged 2 commits intoaxios:v0.xfrom
WillianAgostini:fix-loosing-request-headers
Sep 26, 2022
Merged

fix: loosing request header (#4858)#4871
jasonsaayman merged 2 commits intoaxios:v0.xfrom
WillianAgostini:fix-loosing-request-headers

Conversation

@WillianAgostini
Copy link
Copy Markdown
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.

2 participants