Today, I studied vue+axios for front-end development. When I looked at the axios document, I found that there was a way to get remote pictures in the document. The original text of the document is as follows:
/ / get remote images
axios ({
method:"get",
url:" http://bit.ly/2mTM3nY",
responseType:"stream"
})
.then (function (response) {
response.data.pipe (fs.createWriteStream ("ada_lovelace.jpg"))
});
I am afraid of adding a picture if the format is out of order:
so the question is, what exactly are pipe and fs in the code response.data.pipe (fs.createWriteStream ("ada_lovelace.jpg"))? Console printing did not find these two parameters, ask for advice!