Skip to content

Instantly share code, notes, and snippets.

@nrk
Created September 23, 2008 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nrk/12261 to your computer and use it in GitHub Desktop.
Save nrk/12261 to your computer and use it in GitHub Desktop.
A simple CouchDB client with HTTParty
require 'httparty'
class CouchDB
include HTTParty
base_uri '172.22.107.12:5984'
format :json
def self.info
get '/'
end
end
p CouchDB.info # => {"couchdb"=>"Welcome", "version"=>"0.8.0-incubating"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment