couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <>
Subject Re: 0.11, lists: How to set the Content-Type?
Date Sun, 04 Jul 2010 12:21:45 GMT
Hi Alux,

On 4 Jul 2010, at 13:13, Alux wrote:

> I understood that the lists element of a _design document may contain
> functions that format a views result like the shows format single documents.
> Now I try to build a start page for my experimental application, for CouchDB
> 0.11.0, and find no way to set the Content-Type. So I produce beautifully
> formatted HTML (not, but well, it should be readable), and the browser
> receives application/json instead text/html, and thus doesnt render it.
> Can you suggest any remedies, or links to read further?
> What I did until now was reading here:
> where I learn about an interface change from 0.9 to 0.10, so I cannot
> generate a header, but only use send or return.

A little further down in the "other fun parts" section, you can see that you can use the `start()`
function to send headers from a list function. I updated the wiki to add that to the example
further up, too.


View raw message