tags: vue.js
The data is transferred here in the form of objects, and the official document explains: By default, the data objects will be converted into JSON format and sent to the server. The format of the transferred data should be string format name=cxf&gender=
Official document:https://www.npmjs.com/package/axios
login(){
let { username,password } = this;
this.axios.post('/user/login.do',{
headers: { 'content-type': 'application/x-www-form-urlencoded' }
},
{
params: {username:username,password:password}
}).then((res)=>{
this.res = res;
this.$router.push('/index');
});
},
You only need to add the declaration header, you can add it globally or in the method.
This document is a backup version of the personal blog document system, the author: small tour, author blog:Click to access Axios's request default data will automatically perform JSON encoding. . . H...
HTTP send form Submit data in the background using HTTP to send Form form Submit data in the background using HTTP to send Form form...
Foreach data, you need to export the data. In theory, you need to use the background query, but the gap between the background and the front-end Baidu API provides a longitude and latitude algorithm t...
Data garbled problem when the form is submitted to the web background: Check the encoding format in the html/jsp file, you need to change the encoding format toUTF-8 The background data is normal but ...
This article is reproduced: https: //my.oschina.net/Tsybius2014/blog/659742 My OS is Win7, VS version using VS2012, the text of the code is C # code. These days encountered a problem that I use an emb...
When using panel panel, set the background picture after each run is always flashing, solutions ...
First set the JSP file representation page: Second, set the controller module to run its content: After setting the format of the output content: Run Tomcat. Bane, when the form is submitted as Chines...
Front-end style renderings: Main code of front-end style: The front end submits the function code of registered user information: Background java code The first step: Create a new formDa...
How it works: The page sets a key value, and when the data is added, it is sent to the backend together, and the backend writes a TokenProcessor class to determine whether the key value of each submis...
axios.post with request head and data The first step is introduced into AXIOS...