index.txt

Path: website/index.txt
Last Update: Sun Jan 18 06:53:49 -0500 2009

h1. restr

h1. &x2192; ‘restr‘

h3. Copyright (c) 2008 Urbacon Ltd.

h2. What is it?

Restr is a very simple client for "RESTful":en.wikipedia.org/wiki/Representational_State_Transfer web services. It was developed as a lightweight alternative to "ActiveResource":api.rubyonrails.com/files/vendor/rails/activeresource/README.html.

For project info and downloads please see the Restr‘s "RubyForge Page":rubyforge.org/projects/restr

h2. Installing

<pre syntax="ruby">sudo gem install restr</pre>

h2. Usage Example

Fetch Kitten with id 1 and print out its name and colour:

  require 'restr'
  kitten = Restr.get('http://example.com/kittens/1.xml')
  puts kitten['name']
  puts kitten['colour']

Change the Kitten‘s colour and store the modification:

  kitten['colour'] = 'black'
  kitten = Restr.put('http://example.com/kittens/1.xml', kitten)

h2. Further Resources

h2. How to submit patches

  • See below for author‘s contact info.
  • The trunk repository is svn://rubyforge.org/var/svn/restr/trunk for anonymous access.

h2. License

h2. Contact

[Validate]