Posted by: fdmanana | March 1, 2010

Streaming the body for an HTTP request in Ruby using Net::HTTP

Something I was looking for: streaming the body of an HTTP request in Ruby using Net::HTTP. These Ruby folks should definitely add documentation to all the standard library modules and classes.

The corresponding official Ruby doc for Net::HTTPGenericRequest is:

http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTPGenericRequest.html#M000648

(just a list of method signatures)

What I was looking for has a nice example at:

http://stanislavvitvitskiy.blogspot.com/2008/12/multipart-post-in-ruby.html

Ruby folks shouldn’t assume that everybody has the time to read their source code to figure out how to use APIs.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: