Hello!
I'm building an app using awesome Koa2.
Could you please tell me how can I send binary data (i. e. ArrayBuffer)?
Thanks!
const buf = Buffer.alloc(1024);
ctx.body = buf;
const stream = fs.createReadStream(__filename);
ctx.body = stream;
Thanks
Most helpful comment
Buffer Data
Stream object