Skip to content

Fixing content-type header being present for empty body requests#173

Open
denis-sav wants to merge 10 commits intomainfrom
fix-content-type-present-for-empy-body
Open

Fixing content-type header being present for empty body requests#173
denis-sav wants to merge 10 commits intomainfrom
fix-content-type-present-for-empy-body

Conversation

@denis-sav
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread clients/imodels-client-management/src/base/internal/OperationsBase.ts Outdated
@austeja-bentley
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).


constructor(parseErrorFunc: ParseErrorFunc) {
this._parseErrorFunc = parseErrorFunc;
delete axios.defaults.headers.post["Content-Type"];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment explaining why we are doing this. Also does this solution require to pin axios to exact version 1.1.0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a problem with transpiling axios on 1.1.3, here's an issue for further information:
axios/axios#5011
it should would work if all axios import statements would be changed to require('axios') but since it's a bug inside axios i'm not sure if it is worth to do it rather than just to change version and wait for new version

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