0π
I suggest using fetch
as a modern way to make a request.
Check out examples here https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Body
0π
You could install any HTTP client library β Vue alone doesnβt have a built-in client. Axios
is often used with Vue.js.
Usage is simple as 1-2-3:
axios.post('/users', personList).then(() => {
//your code goes here...
});
- [Vuejs]-Vue.js bidirectional calculation on input value
- [Vuejs]-Path-to-regexp Find regular expression matching the route
Source:stackexchange.com