incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Cohnen <sebastiancoh...@googlemail.com>
Subject Re: couchdb and extjs problems accepting json
Date Thu, 12 Aug 2010 08:13:13 GMT
yes, you need to send Accept: application/json to tell couchdb to return Content-Type: application/json.
Maybe that's the issue that causes trouble with extjs (although I hardly know extjs and I'm
just guessing here)

On 12.08.2010, at 10:07, whimsica@aol.com wrote:

> upon querying a view I get the following
> 
> The response is
> {"total_rows":3,"offset":0,"rows":[
> {"id":"biking","key":"Biking","value":"My biggest hobby is mountainbiking. The other
day..."},
> {"id":"bought-a-cat","key":"Bought a Cat","value":"I went to the the pet store earlier
and brought home a little kitty..."},
> {"id":"hello-world","key":"Hello World","value":"Well hello and welcome to my new blog..."}
> ]}
> 
> 
> The header is
> Hostlocalhost:5984User-AgentMozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723
Ubuntu/10.04 (lucid) Firefox/3.6.8Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Languageen-us,en;q=0.5Accept-Encodinggzip,deflateAccept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive115Connectionkeep-aliveIf-None-Match"4FJLAY9EA3N0KM3J06ZGFPAK9"
> 
> 
> 
> Does that help?
> 
> 
> Thanks,
> Dan
> 
> 
> 
> -----Original Message-----
> From: Nils Breunese <N.Breunese@vpro.nl>
> To: user@couchdb.apache.org <user@couchdb.apache.org>
> Sent: Thu, Aug 12, 2010 12:51 am
> Subject: Re: couchdb and extjs problems accepting json
> 
> 
> Aurélien Bénel wrote:
> 
> 
> 
>> I just noticed (on CouchDB 1.0.0) that views return "Content-Type: 
> 
> text/plain;charset=utf-8"... even when "Content-Type: application/json" was in 
> 
> the GET request.
> 
> 
> 
> You should set "Accept: application/json" on your GET request, not 
> 
> "Content-Type: application/json".
> 
> 
> 
> Nils.
> 
> 
> 
> De informatie vervat in deze  e-mail en meegezonden bijlagen is uitsluitend 
> 
> bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke informatie 
> 
> bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van 
> 
> deze informatie aan derden is voorbehouden aan geadresseerde. De VPRO staat niet 
> 
> in voor de juiste en volledige overbrenging van de inhoud van een verzonden 
> 
> e-mail, noch voor tijdige ontvangst daarvan.
> 
> 
> 


Mime
View raw message