Sending a POST request


What is a POST request?

A POST request submits data to be processed to a specified resource. 

POST request can also be used to fetch data from the server. However, the POST method does not cache data, and is often used to send data along with the request.


Sending POST requests with Axios Edit

Sending POST requests with Axios is not so different from from the GET requests; the syntax is very similar:

axios.post('/api/user', {
firstname: 'John',
lastname: 'Doe'
}).then(response => {
console.log(response);
});

That's pretty much all you need to know before getting started with Axios and VueJS. 


Comments: