Sha256: 54ce175ac45390b5acd2eb9983f28b034e0b1e4ba7e001da9eb07c0b72bce975

Contents?: true

Size: 1.68 KB

Versions: 2

Compression:

Stored size: 1.68 KB

Contents

= A streaming REST client for Ruby that uses libcurl

== Features
* rest-client like API
* Streaming API allows the caller to be handed chunks of the response while it's being received

== How to install

Install it like any other gem hosted at the Githubs like so:

(more instructions here: http://gems.github.com)

 sudo gem install brianmario-streamly

== Example of use

=== A basic GET request

 Streamly.get('www.somehost.com')

=== A streaming GET request

 Streamly.get('www.somehost.com') do |chunk|
   # do something with _chunk_
 end

=== A basic POST request

 Streamly.post('www.somehost.com', 'blah=foo')

=== A streaming POST request

 Streamly.post('www.somehost.com', 'blah=foo') do |chunk|
   # do something with _chunk_
 end

== Benchmarks

Fetching 2,405,005 bytes of JSON from a local lighttpd server

* Streamly: 0.011s
* Shell out to curl: 0.046s
* rest-client: 0.205s

Streaming, and parsing 2,405,005 bytes of JSON from a local lighttpd server

* Streamly: 0.231s
* Shell out to curl: 0.341s
* rest-client: 0.447s

== Special Thanks

There are quite a few *extremely* nice REST client libraries out there for Ruby today. I especially owe thanks
to the following projects. Without them I probably would have never had the inspiration to even take the time
to write this library. In Streamly, you'll find snippets of code, API patterns and examples from all 3 of these projects.
I'll do my best to make sure I give credit where it's due *in* the source. Please let me know if I've missed something!

* rest-client - https://github.com/adamwiggins/rest-client
* curb - https://github.com/taf2/curb
* patron - https://github.com/toland/patron

And again, the Github crew for this amazing service!

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
brianmario-streamly-0.1.1 README.rdoc
brianmario-streamly-0.1.2 README.rdoc