0

my axios:

const axiosIns = axios.create({
timeout: 60000,
responseType: 'json',
transformRequest: [data => qs.stringify(data)],
  headers: {
    'x-Requested-With': 'XMLHttpRequest',
    'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
  },
})

and my post data:

{
  list: [],
  word: "t",
  condition: {
    items: []
  },
}

enter image description here

but, in chrome network request, I find that the post data empty values and keys are removed:

enter image description here

Form Data:
  word: t

Why and where the fault?

serenas
  • 137
  • 4
  • 10

0 Answers0