Typically the front end by a POST request submitted to the server-side data format 4, respectively, is "application / x-www-form-urlencoded" format, "multipart / form-data" format, "application / json" format and "text / xml "format. Usually the most common is "application / json" format, that is, through JSON string.
In the console see the data is this:
Sometimes the background will often get parameters, it is possible to receive because of the type of background for the form, the form needs to Form data to parse correctly, the front end need to change the format at the time of the last pass
axios.defaults.headers = {
'Content-type': 'application/x-www-form-urlencoded'
}
After setting the Content-type when the see the request into a application / x-www-form format, which is not finished, it needs qs. While saying axios built, but every time I myself once installed
The first step: introducing axios ps
Step 2: Use qs conversion
look after it requested data format becomes a matter like this: