incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shorin <kxe...@gmail.com>
Subject Re: Views return content type plain text
Date Wed, 04 Sep 2013 23:57:08 GMT
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 <siriele2x3@gmail.com> 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" <kxepal@gmail.com> 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 <siriele2x3@gmail.com>
>> 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
>>

Mime
View raw message