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 >>
