README.txt in rufus-verbs-0.4 vs README.txt in rufus-verbs-0.5
- old
+ new
@@ -5,16 +5,18 @@
'rufus-verbs' is an extended HTTP client library (gem). It provides the four main HTTP "verbs" as Ruby methods : get, put, post and delete.
It wraps a certain number of techniques that make it a decent tool for manipulating web resources.
+Head and Options are supported as well.
+
== features
currently :
-* follows redirections
+* follows redirections (disable with :noredir => true)
* automatically adds _method={post|put} in the request parameters with the option :fake_put => true
* HTTPS aware ('verify none' by default)
* HTTP basic authentication
* doesn't propagate auth credentials in case of redirection to different host
* advertises and uses gzip compression
@@ -84,9 +86,17 @@
end
# the block accepts a 'request' (Net::HTTPREquest) argument
delete "http://resta.farian.server:7080/inventory/tools/0"
# I don't need that hammer anymore
+
+ ms = options "http://resta.farian.server:7080/inventory/tools"
+ p ms
+ # should yield something like [ :get, :head, :post ]
+
+ res = head "http://resta.farian.server:7080/inventory/tools"
+ # same as get() but only the response headers will be returned
+ # not the response body.
Using get() and co via an EndPoint to share common options for a set of requests
ep = EndPoint.new :host => "resta.farian.host", :port => 7080, :resource => "inventory/tools"