Skip to content

content-type application/x-www-form-urlencoded repeated #4616

@zhangwang945

Description

@zhangwang945

Describe the bug

when 'content-type' is in lowercase,
Devtool Network show :Content-Type: application/x-www-form-urlencoded, application/x-www-form-urlencoded,
that is repeated.

To Reproduce

Code snippet to reproduce, ideally that will work by pasting into something like https://npm.runkit.com/axios, a hosted solution, or a repository that illustrates the issue. If your problem is not reproducible, please file under Support or Usage Question

axios({
  method: 'post',
  url: 'http://yapi.corp.lanyicj.cn/mock/228/stock_trade/user_account',
  headers: { 'content-type': 'application/x-www-form-urlencoded' },
  transformRequest: [
    function () {
      return 'aa=44'
    }
  ]
})

Expected behavior

Content-Type: application/x-www-form-urlencoded

Environment

  • Axios Version [e.g. 0.18.0]
  • Adapter [e.g. XHR/HTTP]
  • Browser [e.g. Chrome, Safari]
  • Browser Version [e.g. 22]
  • Node.js Version [e.g. 13.0.1]
  • OS: [e.g. iOS 12.1.0, OSX 10.13.4]
  • Additional Library Versions [e.g. React 16.7, React Native 0.58.0]

Additional context/Screenshots

Add any other context about the problem here. If applicable, add screenshots to help explain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions