librelist archives

« back to archive

rest-client 1.4.0 available

rest-client 1.4.0 available

From:
Archiloque
Date:
2010-02-28 @ 09:16
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:
* Response is no more a String, and the mixin is replaced by an 
abstract_response, existing calls are redirected to response body with a 
warning.
* enable repeated parameters RestClient.post 
'http://example.com/resource', :param1 => ['one', 'two', 'three'], => 
:param2 => 'foo' (patch provided by Rodrigo Panachi)
* fixed the redirect code concerning relative path and query string 
combination (patch provided by Kevin Read)
* redirection code moved to Response so redirection can be customized 
using the block syntax
* only get and head redirections are now followed by default, as stated in
the specification
* added RestClient.add_before_execution_proc to hack the http request, 
like for oauth

The response change may be breaking in rare cases.

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

Regards

Archiloque