Version 2.1.0

Andy Brody
 

Hi folks,

The rest-client 2.1.0 final release is now available.

https://rubygems.org/gems/rest-client/versions/2.1.0
https://github.com/rest-client/rest-client/releases/tag/v2.1.0

Notable changes in this release:

There is a new dependency on the `http-accept` gem, which is used for
parsing Content-Type charset headers. This works around a bad memory
leak and possible segfault introduced in MRI Ruby 2.4.0 and fixed in
Ruby 2.4.2. (#615)

Use mime/types/columnar from mime-types 2.6.1+, which is leaner in
memory usage than the older storage model of mime-types. (#393)

Add a `:log` option to individual requests. This allows users to set a
log on a per-request / per-resource basis instead of the kludgy global
log. (#538)

Log request duration by tracking request start and end times. Make
`log_response` a method on the Response object, and ensure the `size`
method works on RawResponse objects. (#126)
- `# => 200 OK | text/html 1270 bytes, 0.08s`

Make the logs more configurable in raw_response streaming mode so
rest-client no longer emits log messages on each chunk of data.

Drop custom handling of compression and use built-in Net::HTTP support
for supported Content-Encodings like gzip and deflate. Don't set any
explicit `Accept-Encoding` header, rely instead on Net::HTTP defaults.
(#597)

Note: this changes behavior for compressed responses when using
`:raw_response => true`. Previously the raw response would not have
been uncompressed by rest-client, but now Net::HTTP will uncompress
it.

Fix Netrc support to respect existing Authorization headers,
regardless of letter case. (#550)

Improve handling of payload objects using ParamsArray or Payload
classes. (#508, #603)

The full changelog is available here:
https://github.com/rest-client/rest-client/blob/v2.1.0/history.md

As usual, please file any bugs at
https://github.com/rest-client/rest-client/issues

Cheers,
Andy

Join main@rest-client.groups.io to automatically receive all group messages.