[ANN] rest-client 1.3.0

  • Thread starter Archiloque Archiloque
  • Start date
A

Archiloque Archiloque

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top