I have a nodejs app that I want to use to download a video from a url to keep in a variable as binary. I'm starting off by sending a get request to the url with the response type being stream.
const videoResponse = await axios({
method: 'GET',
url: url,
responseType: 'stream',
});
const video = await videoResponse.data;
I am then trying to store the result of that call in a variable but the response isn't a string of binary but rather an entire object. I've tried calling "pipe" on the data as I've seen from other examples though the object does not contain anything with that name. What do I need to do to store the video I'm downloading as binary in this variable?