couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vlad GURDIGA <>
Subject Re: couchjs vs. js
Date Thu, 30 Jul 2009 09:55:58 GMT
There is a comment in trunk/test/test.js* stating:

// This is a JS wrapper for the curl function made available in couch_js.c,
// it should be used in other JavaScripts that would like to make HTTP calls.

and looking in trunk/src/couchdb/couch_js.c** we can see functions
like GetHttp, HeadHttp, PostHttp, PutHttp, DelHttp, CopyHttp, etc.

Does this mean we can make HTTP calls from JS files? It would be
really handy for integration tests on the server-sde, but AFAIK,
SpiderMonkey (the js binary) dos not have any documented function to
make HTTP calls.

This is why I suspect that there is additional functionality in
couchjs vs. js which we could use.

Now, can somebody confirm or infirm this suspicion?

Thank you!


On Thu, Jul 30, 2009 at 11:12 AM, Nils Breunese<> wrote:
> CouchDB just uses SpiderMonkey to run JavaScript, so your code should work just fine.
> Nils Breunese.
> ________________________________________
> Van: Vlad GURDIGA []
> Verzonden: dinsdag 21 juli 2009 18:30
> Aan:
> Onderwerp: couchjs vs. js
> Hi,
> I'm trying to put together some code and till now I was using js
> (SpiderMonkey) to run Javascript code on the server. Now I see there
> is a "couchjs" binary that is actually the one that is going to
> execute the Javascript on CouchDB. The only documentation I found
> about it is a man page on
> Is there any significat difference between js and couchjs and if there
> is where can I find any documentation about that?
> Thank you!
> 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.

View raw message