After the front-end to back-end data transfer, using the request header, what needs to be done to ensure that the back-end can receive data

// ----- data sequence of the same string and queryString
config.headers["content-type"] = "application/x-www-form-urlencoded"
// qs using the second conversion data serialization ------
config.data=qs.stringify(config.data)
 
Before using qs, install and introducing cnpm i qs -S import qs from "qs";

Guess you like

Origin www.cnblogs.com/wuqilang/p/11261483.html
Recommended