Axios transformRequest

axios默认识别并自动配置content-type为json或form/data

但是发现了一个奇怪的现象,当添加了transformRequest这个参数后(这个参数没有做任何操作),content-type默认值全部变为"application/x-www-form-urlencoded"了?????

    transformRequest: [function (data, headers) {
        console.log(headers);
    }]
  1. patch: {Content-Type: “application/x-www-form-urlencoded”}
  2. post: {Content-Type: “application/x-www-form-urlencoded”}
  3. put: {Content-Type: “application/x-www-form-urlencoded”}