incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ido Ran <ido....@gmail.com>
Subject Re: JSONP
Date Wed, 13 Oct 2010 06:20:57 GMT
Thank you, it is working.

I've been trying to write SproutCore application that will talk to CouchDB
backend, but I didn't know JSONP can only work with GET method not with
POST, PUT or DELETE.

Thanks for the help,
Ido

On Tue, Oct 12, 2010 at 11:33 PM, Paul Davis <paul.joseph.davis@gmail.com>wrote:

> Use Futon or the config HTTP API.
>
> Should be something lie:
>
>    $ curl -X PUT http://hostname/_config/httpd/allow_jsonp -d true
>
>
>
> On Tue, Oct 12, 2010 at 5:19 PM, Ido Ran <ido.ran@gmail.com> wrote:
> > OK, I've change the file default.ini, set allow_jsonp to true.
> > My question now is how can I do that change in couchone.com for
> production
> > use?
> >
> > Thank you,
> > Ido
> >
> > On Tue, Oct 12, 2010 at 11:14 PM, Ido Ran <ido.ran@gmail.com> wrote:
> >
> >> I'm using 1.0.1 in CouchDBX.app.
> >> What setting do I need to change?
> >>
> >> On Tuesday, October 12, 2010, Paul Davis <paul.joseph.davis@gmail.com>
> >> wrote:
> >> > What version are you using?
> >> >
> >> > jsonp has to be turned on in the .ini on recent releases.
> >> >
> >> > On Tue, Oct 12, 2010 at 3:33 PM, Ido Ran <ido.ran@gmail.com> wrote:
> >> >> 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