incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whims...@aol.com
Subject Re: couchdb and extjs problems accepting json
Date Thu, 12 Aug 2010 08:21:34 GMT
How would I do that? The extjs code just specifies a url for retrieving the JSON info.
I don't know how to send anything along with that.

Can you tell me what needs to be done/fixed?

Thanks,

Dan


 

 


 

 

-----Original Message-----
From: Sebastian Cohnen <sebastiancohnen@googlemail.com>
To: user@couchdb.apache.org
Sent: Thu, Aug 12, 2010 1:13 am
Subject: Re: couchdb and extjs problems accepting json


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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message