Try to pass "Accept: application/json" header instead of
"Content-Type" which marks type of returned content, not requested.
Missed Accept headers means all types are expectable and nginx thought
that text/plain is good one.

------------------
,,,^..^,,,



On Sat, May 7, 2011 at 8:12 PM, István <lecc...@gmail.com> wrote:
> $ curl -D - -X GET -H "Content-Type: application/json"
> http://couch.nohup.hu/nohup_urls/c08b5c2c03d31ee767ab891223000d72
> HTTP/1.1 200 OK
> Server: nginx/1.0.0
> Date: Sat, 07 May 2011 16:11:57 GMT
> Content-Type: text/plain;charset=utf-8
> Connection: keep-alive
> Vary: Accept-Encoding
> Etag: "1-e643d169eb8593e9354012fb7a082605"
> Content-Length: 209
> Cache-Control: must-revalidate
>
> I would like the change the _default_ behavior to application/json
>
> I.
>
> On Sat, May 7, 2011 at 4:34 PM, Alexander Shorin <kxe...@gmail.com> wrote:
>
>> Is it for show documents? Just return {json: <your-data>} in this case.
>>
>> ------------------
>> ,,,^..^,,,
>>
>>
>>
>> On Sat, May 7, 2011 at 7:24 PM, István <lecc...@gmail.com> wrote:
>> > Hi,
>> >
>> > is there an easy way to change the default content type
>> > from  text/plain;charset=utf-8 to application/json somehow?
>> >
>> > Regards,
>> > Istvan
>> >
>> >
>> > --
>> > the sun shines for all
>> >
>>
>
>
>
> --
> the sun shines for all
>

Reply via email to