incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ido Ran <ido....@gmail.com>
Subject JSONP
Date Tue, 12 Oct 2010 19:33:12 GMT
Hi,

I'm trying to access CouchDB using JSONP.
I'm using curl to see if I get the right response but I never get the
callback around there data, only the data itself just like a regular call.

I've try it on single doc and a view and it does not work for me.
I've notice this bug fix
https://issues.apache.org/jira/browse/COUCHDB-343which means it
CouchDB should support it.

SingleDoc: curl http://localhost:5984/todos/task-1?callback=blah

{"total_rows":1,"offset":0,"rows":[
{"id":"task-1","key":"task-1","value":{"_id":"task-1","_rev":"1-51d5d67d13db6285a551634e805a78e1","description":"hello","isDone":false,"_deleted_conflicts":["2-fecb3acf61cc5c83cbc24c332b041a89"]}}
]}


View: curl
http://localhost:5984/todos/_design/app/_view/allTasks?callback=blah

{"_id":"task-1","_rev":"1-51d5d67d13db6285a551634e805a78e1","description":"hello","isDone":false}
IdoMac:~ idoran$ curl http://localhost:5984/todos/task-1?callback=blah
{"_id":"task-1","_rev":"1-51d5d67d13db6285a551634e805a78e1","description":"hello","isDone":false}


What am I doing wrong?

Thank you,
Ido

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message