maxogden/dat — pull request #214 by finnp (2014-11-12 22:49:05+00:00)
Title: WIP: REST Handling for /api/rows

This is just my WIP PR, which also will fail the tests until https://github.com/maxogden/csv-write-stream/pull/14 is merged and the data-format module is updated. It relates to bug #210

What this tries to achieve is having the exact same options for the REST api /api/rows endpoint as for createReadStream concerning the `format` option. Therefore I moved all formatting in its own module.

I also wanted to allow users to use accept headers, but that's the messy part in `lib/format.js`. There I am trying to map formats to mediatypes. Also I don't want to break the existing APIs. But maybe that is something worth doing?

/cc @karissa