couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Walgran <>
Subject Downloading CSV from the browser by POSTing keys to a list?
Date Wed, 16 Feb 2011 18:15:43 GMT
I have a list function that returns a group of documents as a CSV file.

I am feeding this list function with a view, which I am filtering by
passing an array of keys in a JSON object in the body of a POST

I can POST to the list and get the correct response using curl. So far so good.

Is it possible to trigger this post when a user clicks a 'Download
CSV' link on my html page? I can't use $.post because the data is
returned to a callback and I need the data and headers to go to the

Googling for this results in suggestions that I add an invisible form
to the DOM and post that, but I don't believe this will POST the JSON
body in the way Couch expects.

Any suggestions on how I can make this work?



View raw message