0👍
For send parameter(s) you need to use parameter passing by GET or POST method or use a more convenient library like Axios
let data = [ {'a': name, 'b': name}];
fetch(`/api/getnames?dict=`+JSON.stringify(data) ) ...
request.GET['dict']
or
fetch('/api/getnames', {
method: 'POST',
body: JSON.stringify({dict: data})
} ) ...
or
axios.post('/api/getnames', { dict: [ {'a': name, 'b': name}] } );
request.POST['dict']
- [Vuejs]-Is the Vuex mutation written correctly?
- [Vuejs]-Vue 3: How to create SSR + SPA functionality for a CMS engine?
Source:stackexchange.com