I could have sworn I replied to this earlier :)
On 30 Jul 2009, at 11:55, Vlad GURDIGA wrote:
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?
couchjs is js + curl bindings for the test suite.
Cheers
Jan
--
Thank you!
*http://svn.apache.org/viewvc/couchdb/trunk/test/test.js?revision=794057
**http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_js.c?revision=794057
On Thu, Jul 30, 2009 at 11:12 AM, Nils Breunese<[email protected]>
wrote:
CouchDB just uses SpiderMonkey to run JavaScript, so your code
should work just fine.
Nils Breunese.
________________________________________
Van: Vlad GURDIGA [[email protected]]
Verzonden: dinsdag 21 juli 2009 18:30
Aan: [email protected]
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
http://manpages.ubuntu.com/manpages/intrepid/man1/couchjs.1.html.
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.