[ANN] rest-client 1.3.0


Archiloque <code@...>
 

Hi all,

I'm pleased to announce that rest-client 1.3.0 has been released

rest-client is a simple HTTP and REST client for Ruby, inspired by the
Sinatra’s microframework style of specifying actions: get, put, post,
delete.

Example :

RestClient.get 'http://example.com/resource'
RestClient.post 'http://example.com/resource', :param1 =>
'one', :nested => { :param2 => 'two' }
RestClient.post "http://example.com/resource", { 'x' =>
1 }.to_json, :content_type => :json, :accept => :json

Changes:
* a block can be used to process a request's result, this enable to
handle custom error codes or paththrought (design by Cyril Rohr)
* cleaner log API, add a warning for some cases but should be compatible
* accept multiple "Set-Cookie" headers, see http://www.ietf.org/rfc/rfc2109.txt
(patch provided by Cyril Rohr)
* remove "Content-Length" and "Content-Type" headers when following a
redirection (patch provided by haarts)
* all http error codes have now a corresponding exception class and
all of them contain the Reponse -> this means that the raised
exception can be different
* changed "Content-Disposition: multipart/form-data" to "Content-
Disposition: form-data" per RFC 2388 (patch provided by Kyle Crawford)

The only breaking change should be the exception classes, but as the
new classes inherits from the existing ones, the breaking cases should
be rare.

Homepage http://github.com/archiloque/rest-client

Regards

Archiloque