incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Wenk <a...@nms.de>
Subject Re: HTTP request with CouchDB
Date Wed, 13 Nov 2013 12:54:01 GMT
On 13 November 2013 13:48, Hank Knight <hknight555@gmail.com> wrote:

> Is it possible to send an HTTP request and receive a result with CouchDB?
>
> I would like to do something like this:
>
>
> function(doc, req) {
>     var http = new XMLHttpRequest();
>     http.open( "GET", "http://www.w3schools.com/xml/note.xml", false );
>     http.send( null );
>     emit("xyz",http.responseText);
> }
>

CouchDB has a RESTful HTTP interface - so yes you can do that. Please check
out the docs at http://docs.couchdb.org/en/latest/intro/api.html

Examples can be found in Futon - the Webinterface of CouchDB.

Cheers

Andy
-- 
Andy Wenk
Hamburg - Germany
RockIt!

http://www.couchdb-buch.de
http://www.pg-praxisbuch.de

GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588

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