gdi / curb-fu
- Source
- Commits
- Network (3)
- Issues (1)
- Downloads (13)
- Wiki (1)
- Graphs
-
Tree:
ba08872
commit ba0887226caad83e75f08e9848f7b564bbf0d777
tree 434d269954698b3b2974f4bd97f7a6292c46e34f
parent 751712c62ca01065b3a783be3d963ae853f55381
tree 434d269954698b3b2974f4bd97f7a6292c46e34f
parent 751712c62ca01065b3a783be3d963ae853f55381
curb-fu /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
LICENSE | Wed May 20 08:33:27 -0700 2009 | |
| |
README | Wed May 20 08:33:27 -0700 2009 | |
| |
Rakefile | Wed May 20 08:33:27 -0700 2009 | |
| |
curb-fu.gemspec | ||
| |
lib/ | ||
| |
spec/ |
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!

