Oh I'm familiar with that aspect of things I just find it curious that the default it text plain. .even though it always sends json.(unless.it's told not to by some function like lists to do something different).. ..even under error conditions..and I believe the content type is set to application json at that point. ..but with views the default success scenario is text plain. Even though it is always json. .. But I do appreciate your very quick reply and in the future I'll set that header On Sep 4, 2013 4:57 PM, "Alexander Shorin" <[email protected]> wrote:
> curl sends Accept: */* request header by default, so it matches > text/plain MIME type. Browsers does the same, so you may see the > response as text without request to download it as file (browsers > doesn't support rendering application/json content without special > extensions). > -- > ,,,^..^,,, > > > On Thu, Sep 5, 2013 at 3:52 AM, Stanley Iriele <[email protected]> > wrote: > > Hmm....I did not set that header...I was just hitting it with curl or the > > browser. ..I'll give that a shot. Thanks > > On Sep 4, 2013 4:49 PM, "Alexander Shorin" <[email protected]> wrote: > > > >> Checkout request's Accept header. It should have `application/json` > >> value to let CouchDB make response with the same content type. In case > >> of wildcard or missed accept CouchDB always returns text/plain > >> response. > >> -- > >> ,,,^..^,,, > >> > >> > >> On Thu, Sep 5, 2013 at 3:43 AM, Stanley Iriele <[email protected]> > >> wrote: > >> > Hey all, > >> > > >> > Is there any particular reason couchdb views return content type. > >> > Text/plain. Instead of application json. Even though they always > return > >> > json. .it's not blocking anything....I've just been wondering this > for a > >> > while now, > >> > > >> > Regards, > >> > > >> > Stanley > >> >
