public
Fork of pezra/resourceful
Description: An HTTP library for Ruby that takes advantage of everything HTTP has to offer.
Homepage: http://absolute-performance.com/open-source/resourceful
Clone URL: git://github.com/paul/resourceful.git
name age message
file .autotest Loading commit data...
file .gitignore
file LICENSE
file README
file Rakefile
directory lib/
directory spec/
README
Resourceful
============

Resourceful provides a convenient Ruby API for making HTTP requests.

Features:

  * GET, PUT and POST HTTP requests
  * support for  HTTP Basic and Digest authentication
  * pluggable unmarshallers for parsing response bodies


Example
=======

Get html page

    require 'resourceful'
    http = Resourceful::HttpAccessor.new
    resp = http.resource('http://rubyforge.org').get(:accept => 'text/html')
    puts resp.body

Get page requiring HTTP Authentication

    require 'resourceful'
    class AuthInfoProvider
      def authenication_info(realm)
        ['my_account', 'my-super-secert-password']
      end
    end

    http = Resourceful::HttpAccessor.new(:authentication_info_provider => AuthInfoProvider.new)
    resp = http.resource('http://internal-app/').get(:accept => 'text/html')
    puts resp.body


Copyright (c) 2008 Absolute Performance, Inc, released under the GNU Lesser General Public License.