Axios's post request for 415 unsupported media type, and 400 Bad Request

the axios, used starts at 415 and is changed to the request header "Content-Type":"application/json;charset=utf-8". After the request header, it begins to report 400.
the upper parameter is originally like this

.

clipboard.png

clipboard.png
for some unknown reason, the interface keeps reporting 400

.
Mar.14,2021

I haven't used axios, but let me help you configure it.

clipboard.png

configure source

you can try this configuration to see if you can prevent request's payload from being modified


when the upper parameter sent by axios is an array, the backend will not receive the parameter, and the request header can keep 'Content-Type':'application/x-www-form-urlencoded; charset=utf-8'.

then convert the array to be uploaded into a string using JSON.stringify (arr)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ec22-2bc87.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ec22-2bc87.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?