Answers for "axios send payload with post"

15

axios send post data

// Send a POST request
axios({
  method: 'post',
  url: '/user/12345',
  data: {
    firstName: 'Fred',
    lastName: 'Flintstone'
  },
  headers: {'Authorization': 'Bearer ...'}
});
Posted by: Guest on April-13-2020
-1

axios send payload in get request

axios.get('/api/updatecart', {
  params: {
    product: this.product
  }
}).then(...)
Posted by: Guest on August-09-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language