couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alux <alu...@googlemail.com>
Subject Re: 0.11, lists: How to set the Content-Type?
Date Sun, 04 Jul 2010 16:33:37 GMT
Hi Jan,

many thanks. It works now. I had even read the example from the otherfun
section, but was somehow not able to recognise it as solution to my problem.

Thanks, alux

On 4 July 2010 14:21, Jan Lehnardt <jan@apache.org> wrote:

> 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:
> > http://wiki.apache.org/couchdb/Formatting_with_Show_and_List
> > 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.
>
> Cheers
> Jan
> --
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message