Answers for "Implement a POST request with axios and write a console.log for each of starting, success, and failure."

1

Using axios send a GET request to the address:

// GET request for remote image
axios({
  method: 'get',
  url: 'http://bit.ly/2mTM3nY',
  responseType: 'stream'
})
  .then(function(response) {
  response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))
});
Posted by: Guest on April-10-2020

Code answers related to "Implement a POST request with axios and write a console.log for each of starting, success, and failure."

Browse Popular Code Answers by Language