public
Description: Simple, yet powerful wrapper for taf2's curb (libcurl) library
Homepage:
Clone URL: git://github.com/gdi/curb-fu.git
name age message
file .gitignore Tue Jul 14 11:40:01 -0700 2009 ignoring komodo project file [dkastner]
file LICENSE Wed May 20 08:33:27 -0700 2009 added license [dkastner]
file README Wed May 20 08:33:27 -0700 2009 added license [dkastner]
file Rakefile Wed May 20 08:33:27 -0700 2009 updated README, removed dross from Rakefile [dkastner]
file curb-fu.gemspec Wed Oct 14 10:49:31 -0700 2009 Requiring curb, not taf2-curb [Derek and Matt]
directory lib/ Mon Sep 28 09:44:58 -0700 2009 Default request timeout is now 10s [Derek and Matt]
directory spec/ Fri Oct 09 11:10:27 -0700 2009 Removed gem file, fixed CurbFu.stubs spec [dkastner]
README
== curb-fu - easy-to-use wrapper around curb - the ruby wrapper around libcurl

* http://github.com/curb-fu

Curb can be found at http://github.com/taf2/curb

=== License

This gem is released under the terms of the Ruby license.  See the LICENSE file for details.

=== Prerequisites

* Ruby (tested on 1.8.7, 1.9.1)
* The Curb gem (and its libcurl dependency)
  * http://github.com/taf2/curb

=== Installation

  $ gem install curb-fu --source http://gems.github.com

Or, if you ahve the source:

  $ cd <source-dir>
  $ rake gem
  $ gem install pkg/

=== Examples

Urls can be requested using hashes of options or strings.  The GET, POST, PUT, and DELETE methods are supported 
through their respective methods on CurbFu and CurbFu::Request. 

==== String Examples

response = CurbFu.get('http://slashdot.org')
puts response.body

response = CurbFu.post('http://example.com/some/resource', { :color => 'red', :shape => 'sphere' })
puts response.body unless response.success?

==== Hash Examples

response = CurbFu.get(:host => 'github.com', :path => '/gdi/curb-fu')
puts response.body

response = CurbFu.post({:host => 'example.com', :path => '/some/resource'}, { :color => 'red', :shape => 'sphere' })
puts response.body unless response.success?


Have fun!