README.rdoc in http2-0.0.14 vs README.rdoc in http2-0.0.15
- old
+ new
@@ -1,7 +1,33 @@
= http2
-Description goes here.
+Example of usage:
+
+ require "rubygems"
+ require "http2"
+
+ Http2.new(:host => "www.google.dk") do |http|
+ #Get-request.
+ res = http.get("path/to/something")
+ puts res.body
+ puts "All response-headers: #{res.headers}"
+ puts "Specific header: #{res.header("HeaderName")}"
+
+ #Post-request.
+ res = http.post(:url => "path/to/something", :post => {
+ "some_post_val" => "some_value"
+ })
+
+ #Post-multipart (upload).
+ res = http.post_multipart(:url => "path/to/something", :post => {
+ "test_file1" => {
+ :fpath => fpath,
+ :filename => "specfile"
+ }
+ })
+
+ puts "Cookies until now: #{http.cookies}"
+ end
== Contributing to http2
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.