Monday, 13 August 2018

Promisified request, GET binary buffer stream?

Hello!I have a GET request, a docx which comes in as a lovely 'application/octet-stream'. I've had success with downloading it as a Request using .on('data') and .on('end'), concatenating it altogether.I want this Request to be promisified. Both Promisify.All(require('request')) and the request-promise library gives the same result: a .body with garbage encoded data.How can I download this file while keeping it Promisified? Thanks!

Submitted August 13, 2018 at 08:17PM by YinglingLight

No comments:

Post a Comment