express-csv
express-csv copied to clipboard
Bring up-to-date with Express 4.x
This package doesn't fully work with express 4.x (haven't tested other versions). More specifically, the sending of headers and status is not working, and deprecated respectively.
Fixing this is fairly easy:
Replace this.header('Content-Type', 'text/csv');
with this.set('Content-Type', 'text/csv');
and return this.send(body, headers, status);
with:
this.set(headers);
return this.status(status).send(body);
My fork of this should work as expected with express 4.x - https://www.npmjs.com/package/csv-express