couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: JSONP
Date Tue, 12 Oct 2010 21:33:27 GMT
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
View raw message