Is the data prompt parameter of vue axios request empty?

recently wrote a small project in vue, and after writing a static page, I was ready to bind data and ran into a problem.
looks up how vue gets the data, and ends up using vue"s axios.
main.js Code:

clipboard.png

:

clipboard.png

:
clipboard.png

postmanjquery

clipboard.png

clipboard.png


the token value is empty and the data is returned. Save it and test it again.

another: data: data


if the data type is in JSON format in axios, then the header content-type will be set to application/json
you can first check whether the body parsing method in the backend post method supports application/json
if it does not support application/json.

you can use the application/x-www-form-urlencoded;charset=utf-8 format
similar to the following, so the data is a string in xxx=yyy&xxxx=yyyy format (which will be placed in body)

axios.post(url, 'name=xxx&token=xxxxx') 

is the traditional post submission method of jQuery

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-1e887bb-46cc0.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-1e887bb-46cc0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?