RESTClient v2.1.0 Release Notes
Release Date: 2019-08-21 // over 5 years ago-
- โ Add a dependency on http-accept for parsing Content-Type charset headers. This works around a bad memory leak 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
: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 thesize
method works on RawResponse objects. (#126)# => 200 OK | text/html 1270 bytes, 0.08s
- Also add a new
:stream_log_percent
parameter, which is applicable only when:raw_response => true
is set. This causes progress logs to be emitted only on every N% (default 10%) of the total download size rather than on every chunk.
- โฌ๏ธ 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.
- Note: this changes behavior for compressed responses when using
- The previous fix to avoid having Netrc username/password override an Authorization header was case-sensitive and incomplete. Fix this by respecting existing Authorization headers, regardless of letter case. (#550)
- ๐ฐ Handle ParamsArray payloads. Previously, rest-client would silently drop a ParamsArray passed as the payload. Instead, automatically use Payload::Multipart if the ParamsArray contains a file handle, or use Payload::UrlEncoded if it doesn't. (#508)
- ๐ฐ Gracefully handle Payload objects (Payload::Base or subclasses) that are
passed as a payload argument. Previously,
Payload.generate
would wrap a Payload object in Payload::Streamed, creating a pointlessly nested payload. Also add aclosed?
method to Payload objects, and don't error inshort_inspect
ifsize
returns nil. (#603) - โ Test with an image in the public domain to avoid licensing complexity. (#607)
Previous changes from v2.1.0.rc1
-
- โ Add a dependency on http-accept for parsing Content-Type charset headers. This works around a bad memory leak introduced in Ruby 2.4.x (the leak is probably a bug in MRI). (#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
: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 thesize
method works on RawResponse objects. (#126)# => 200 OK | text/html 1270 bytes, 0.08s
- โฌ๏ธ 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.
- Note: this changes behavior for compressed responses when using
- The previous fix to avoid having Netrc username/password override an Authorization header was case-sensitive and incomplete. Fix this by respecting existing Authorization headers, regardless of letter case. (#550)
- ๐ฐ Handle ParamsArray payloads. Previously, rest-client would silently drop a ParamsArray passed as the payload. Instead, automatically use Payload::Multipart if the ParamsArray contains a file handle, or use Payload::UrlEncoded if it doesn't. (#508)
- ๐ฐ Gracefully handle Payload objects (Payload::Base or subclasses) that are
passed as a payload argument. Previously,
Payload.generate
would wrap a Payload object in Payload::Streamed, creating a pointlessly nested payload. Also add aclosed?
method to Payload objects, and don't error inshort_inspect
ifsize
returns nil. (#603) - โ Test with an image in the public domain to avoid licensing complexity. (#607)