couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Getting_started_with_Rebol" by IngoHohmann
Date Thu, 21 Jan 2010 09:59:28 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Getting_started_with_Rebol" page has been changed by IngoHohmann.
The comment on this change is: Added full console session and 'to-string.
http://wiki.apache.org/couchdb/Getting_started_with_Rebol?action=diff&rev1=2&rev2=3

--------------------------------------------------

  == How to read data from CouchDB using Rebol ==
  
  {{{
- read http://localhost:5984/db2/id
+ to-string read http://localhost:5984/db2/id
  }}}
  
  == How to write data to CouchDB using Rebol ==
  
  {{{
- write http://localhost:5984/db2/id json-data
+ to-string write http://localhost:5984/db2/id json-data
  }}}
  
  == How to create a new CouchDB Database using Rebol ==
  
  {{{
- write http://localhost:5984/db2 [PUT [] ""]
+ to-string write http://localhost:5984/db2 [PUT [] ""]
  }}}
+ 
+ == A complete console session ==
+ 
+ {{{
+ >> to-string write http://localhost:5984/hohtest [PUT]
+ == {{"ok":true}}
+ 
+ >> to-string write http://localhost:5984/hohtest {{"_id":"hello","data":"Hello World!"}}
+ == {{"ok":true,"id":"hello","rev":"1-a67aaac28adabcdd8d0718187741d49d"}}
+ 
+ >> to-string read http://localhost:5984/hohtest/hello
+ == {{"_id":"hello","_rev":"1-a67aaac28adabcdd8d0718187741d49d","data":"Hello World!"}}
+ 
+ >> to-string write http://localhost:5984/hohtest [DELETE]
+ == {{"ok":true}}
+ }}}
+ 
+ BTW, to-string is only needed to make it human readable. Without it, the return values would
be binary.
+ 
  
  = A Rebol3 module =
  

Mime
View raw message