2017-04-28 01:12:17 -04:00
# unreleased
2017-04-28 01:28:10 -04:00
- 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)
2017-04-28 01:54:19 -04:00
- 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)
2017-05-03 23:56:24 -04:00
- 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`
2017-05-24 00:51:15 -04:00
- 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.
2017-05-03 23:56:24 -04:00
- 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.
2017-05-04 01:37:33 -04:00
- 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)
2017-05-22 01:05:53 -04:00
- 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)
2017-05-22 01:38:53 -04:00
- 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 a `closed?` method to Payload objects, and don't error in
`short_inspect` if `size` returns nil. (#603)
2017-04-28 01:28:10 -04:00
2017-04-23 17:42:51 -04:00
# 2.0.2
2017-02-19 14:55:35 -05:00
2017-04-09 19:14:57 -04:00
- Suppress the header override warning introduced in 2.0.1 if the value is the
same. There's no conflict if the value is unchanged. (#578)
2017-02-19 09:33:43 -05:00
# 2.0.1
2016-12-01 00:33:15 -05:00
- Warn if auto-generated headers from the payload, such as Content-Type,
2017-02-19 09:33:43 -05:00
override headers set by the user. This is usually not what the user wants to
happen, and can be surprising. (#554)
2017-02-18 18:37:32 -05:00
- Drop the old check for weak default TLS ciphers, and use the built-in Ruby
defaults. Ruby versions from Oct. 2014 onward use sane defaults, so this is
no longer needed. (#573)
2016-12-01 00:33:15 -05:00
2014-11-25 18:22:54 -05:00
# 2.0.0
2015-03-14 15:49:59 -04:00
This release is largely API compatible, but makes several breaking changes.
2014-12-04 20:02:57 -05:00
2016-02-09 18:17:52 -05:00
- Drop support for Ruby 1.9
2016-05-01 17:19:57 -04:00
- Allow mime-types as new as 3.x (requires ruby 2.0)
2015-03-14 15:49:59 -04:00
- Respect Content-Type charset header provided by server. Previously,
rest-client would not override the string encoding chosen by Net::HTTP. Now
responses that specify a charset will yield a body string in that encoding.
For example, `Content-Type: text/plain; charset=EUC-JP` will return a String
2016-06-05 23:57:59 -04:00
encoded with `Encoding::EUC_JP` . (#361)
2014-12-05 18:01:34 -05:00
- Change exceptions raised on request timeout. Instead of
2015-09-09 23:54:59 -04:00
`RestClient::RequestTimeout` (which is still used for HTTP 408), network
timeouts will now raise either `RestClient::Exceptions::ReadTimeout` or
`RestClient::Exceptions::OpenTimeout` , both of which inherit from
`RestClient::Exceptions::Timeout` . For backwards compatibility, this still
inherits from `RestClient::RequestTimeout` so existing uses will still work.
This may change in a future major release. These new timeout classes also
make the original wrapped exception available as `#original_exception` .
- Unify request exceptions under `RestClient::RequestFailed` , which still
inherits from `ExceptionWithResponse` . Previously, HTTP 304, 401, and 404
inherited directly from `ExceptionWithResponse` rather than from
`RequestFailed` . Now _all_ HTTP status code exceptions inherit from both.
2015-09-27 16:00:13 -04:00
- Rename the `:timeout` request option to `:read_timeout` . When `:timeout` is
passed, now set both `:read_timeout` and `:open_timeout` .
2014-12-05 18:01:34 -05:00
- Change default HTTP Accept header to `*/*`
2014-11-25 18:22:54 -05:00
- Use a more descriptive User-Agent header by default
2014-12-05 18:01:34 -05:00
- Drop RC4-MD5 from default cipher list
2014-11-27 23:22:28 -05:00
- Only prepend http:// to URIs without a scheme
2014-12-04 20:02:57 -05:00
- Fix some support for using IPv6 addresses in URLs (still affected by Ruby
2.0+ bug https://bugs.ruby-lang.org/issues/9129, with the fix expected to be
backported to 2.0 and 2.1)
2015-06-10 03:07:03 -04:00
- `Response` objects are now a subclass of `String` rather than a `String` that
mixes in the response functionality. Most of the methods remain unchanged,
but this makes it much easier to understand what is happening when you look
at a RestClient response object. There are a few additional changes:
- Response objects now implement `.inspect` to make this distinction clearer.
- `Response#to_i` will now behave like `String#to_i` instead of returning the
HTTP response code, which was very surprising behavior.
- `Response#body` and `#to_s` will now return a true `String` object rather
2015-09-27 16:00:13 -04:00
than self. Previously there was no easy way to get the true `String`
response instead of the Frankenstein response string object with
AbstractResponse mixed in.
2016-05-01 17:04:49 -04:00
- Response objects no longer accept an extra request args hash, but instead
access request args directly from the request object, which reduces
confusion and duplication.
2015-03-24 00:59:53 -04:00
- Handle multiple HTTP response headers with the same name (except for
Set-Cookie, which is special) by joining the values with a comma space,
compliant with RFC 7230
2016-06-05 16:41:12 -04:00
- Rewrite cookie support to be much smarter and to use cookie jars consistently
2016-06-05 23:57:59 -04:00
for requests, responses, and redirection in order to resolve long-standing
complaints about the previously broken behavior: (#498)
2016-06-05 16:41:12 -04:00
- The `:cookies` option may now be a Hash of Strings, an Array of
HTTP::Cookie objects, or a full HTTP::CookieJar.
- Add `RestClient::Request#cookie_jar` and reimplement `Request#cookies` to
be a wrapper around the cookie jar.
- Still support passing the `:cookies` option in the headers hash, but now
raise ArgumentError if that option is also passed to `Request#initialize` .
- Warn if both `:cookies` and a `Cookie` header are supplied.
2016-06-05 19:19:18 -04:00
- Use the `Request#cookie_jar` as the basis for `Response#cookie_jar` ,
creating a copy of the jar and adding any newly received cookies.
- When following redirection, also use this same strategy so that cookies
from the original request are carried through in a standards-compliant way
by the cookie jar.
2015-04-14 18:44:59 -04:00
- Don't set basic auth header if explicit `Authorization` header is specified
2015-04-14 19:08:46 -04:00
- Add `:proxy` option to requests, which can be used for thread-safe
per-request proxy configuration, overriding `RestClient.proxy`
2015-05-18 21:53:53 -04:00
- Allow overriding `ENV['http_proxy']` to disable proxies by setting
`RestClient.proxy` to a falsey value. Previously there was no way in Ruby 2.x
to turn off a proxy specified in the environment without changing `ENV` .
2015-04-14 20:11:26 -04:00
- Add actual support for streaming request payloads. Previously rest-client
would call `.to_s` even on RestClient::Payload::Streamed objects. Instead,
treat any object that responds to `.read` as a streaming payload and pass it
through to `.body_stream=` on the Net:HTTP object. This massively reduces the
memory required for large file uploads.
2016-06-05 23:57:59 -04:00
- Changes to redirection behavior: (#381, #484 )
2016-05-01 17:06:55 -04:00
- Remove `RestClient::MaxRedirectsReached` in favor of the normal
`ExceptionWithResponse` subclasses. This makes the response accessible on
the exception object as `.response` , making it possible for callers to tell
what has actually happened when the redirect limit is reached.
- When following HTTP redirection, store a list of each previous response on
the response object as `.history` . This makes it possible to access the
original response headers and body before the redirection was followed.
- Follow redirection consistently, regardless of whether the HTTP method was
passed as a symbol or string. Under the hood rest-client now normalizes the
HTTP request method to a lowercase string.
2015-06-10 02:55:49 -04:00
- Add `:before_execution_proc` option to `RestClient::Request` . This makes it
possible to add procs like `RestClient.add_before_execution_proc` to a single
request without global state.
2015-09-27 16:00:13 -04:00
- Run tests on Travis's beta OS X support.
2015-11-07 18:55:28 -05:00
- Make `Request#transmit` a private method, along with a few others.
- Refactor URI parsing to happen earlier, in Request initialization.
2016-06-05 23:57:59 -04:00
- Improve consistency and functionality of complex URL parameter handling:
- When adding URL params, handle URLs that already contain params.
- Add new convention for handling URL params containing deeply nested arrays
and hashes, unify handling of null/empty values, and use the same code for
GET and POST params. (#437)
2016-06-06 00:55:31 -04:00
- Add the RestClient::ParamsArray class, a simple array-like container that
can be used to pass multiple keys with same name or keys where the ordering
is significant.
2015-11-12 06:41:47 -05:00
- Add a few more exception classes for obscure HTTP status codes.
2015-11-16 05:36:55 -05:00
- Multipart: use a much more robust multipart boundary with greater entropy.
2015-11-16 06:08:39 -05:00
- Make `RestClient::Payload::Base#inspect` stop pretending to be a String.
2016-05-15 23:08:43 -04:00
- Add `Request#redacted_uri` and `Request#redacted_url` to display the URI
with any password redacted.
2015-02-19 21:14:31 -05:00
2015-09-13 02:52:54 -04:00
# 2.0.0.rc1
Changes in the release candidate that did not persist through the final 2.0.0
release:
- RestClient::Exceptions::Timeout was originally going to be a direct subclass
of RestClient::Exception in the release candidate. This exception tree was
made a subclass of RestClient::RequestTimeout prior to the final release.
2015-03-22 21:10:06 -04:00
# 1.8.0
- Security: implement standards compliant cookie handling by adding a
dependency on http-cookie. This breaks compatibility, but was necessary to
address a session fixation / cookie disclosure vulnerability.
(#369 / CVE-2015-1820)
Previously, any Set-Cookie headers found in an HTTP 30x response would be
sent to the redirection target, regardless of domain. Responses now expose a
cookie jar and respect standards compliant domain / path flags in Set-Cookie
headers.
2015-02-19 21:14:31 -05:00
# 1.7.3
- Security: redact password in URI from logs (#349 / OSVDB-117461)
2015-01-28 01:35:46 -05:00
- Drop monkey patch on MIME::Types (added `type_for_extension` method, use
the public interface instead.
2014-11-25 18:22:54 -05:00
2014-07-14 15:38:13 -04:00
# 1.7.2
- Ignore duplicate certificates in CA store on Windows
2014-07-08 20:28:38 -04:00
# 1.7.1
- Relax mime-types dependency to continue supporting mime-types 1.x series.
There seem to be a large number of popular gems that have depended on
mime-types '~> 1.16' until very recently.
- Improve urlencode performance
- Clean up a number of style points
2014-04-25 22:31:36 -04:00
# 1.7.0
- This release drops support for Ruby 1.8.7 and breaks compatibility in a few
other relatively minor ways
- Upgrade to mime-types ~> 2.0
- Don't CGI.unescape cookie values sent to the server (issue #89 )
- Add support for reading credentials from netrc
- Lots of SSL changes and enhancements: (#268)
- Enable peer verification by default (setting `VERIFY_PEER` with OpenSSL)
- By default, use the system default certificate store for SSL verification,
even on Windows (this uses a separate Windows build that pulls in ffi)
- Add support for SSL `ca_path`
- Add support for SSL `cert_store`
- Add support for SSL `verify_callback` (with some caveats for jruby, OS X, #277 )
- Add support for SSL ciphers, and choose secure ones by default
- Run tests under travis
- Several other bugfixes and test improvements
- Convert Errno::ETIMEDOUT to RestClient::RequestTimeout
- Handle more HTTP response codes from recent standards
- Save raw responses to binary mode tempfile (#110)
- Disable timeouts with :timeout => nil rather than :timeout => -1
- Drop all Net::HTTP monkey patches
2014-04-25 21:36:44 -04:00
# 1.6.8
- The 1.6.x series will be the last to support Ruby 1.8.7
- Pin mime-types to < 2.0 to maintain Ruby 1 . 8 . 7 support
- Add Gemfile, AUTHORS, add license to gemspec
- Point homepage at https://github.com/rest-client/rest-client
- Clean up and fix various tests and ruby warnings
- Backport `ssl_verify_callback` functionality from 1.7.0
2011-08-24 12:10:20 -04:00
# 1.6.7
- rebuild with 1.8.7 to avoid https://github.com/rubygems/rubygems/pull/57
2011-08-22 12:36:32 -04:00
# 1.6.6
2011-08-24 12:10:20 -04:00
- 1.6.5 was yanked
2011-08-22 12:36:32 -04:00
2011-06-26 11:14:37 -04:00
# 1.6.5
- RFC6265 requires single SP after ';' for separating parameters pairs in the 'Cookie:' header (patch provided by Hiroshi Nakamura)
2011-06-26 11:31:07 -04:00
- enable url parameters for all actions
2011-08-15 04:17:43 -04:00
- detect file parameters in arrays
2011-08-22 12:10:45 -04:00
- allow disabling the timeouts by passing -1 (patch provided by Sven Böhm)
2011-06-26 11:14:37 -04:00
2011-06-13 05:45:37 -04:00
# 1.6.4
- fix restclient script compatibility with 1.9.2
2011-07-12 13:31:48 -04:00
- fix unlinking temp file (patch provided by Evan Smith)
- monkeypatching ruby for http patch method (patch provided by Syl Turner)
2011-06-13 05:45:37 -04:00
2011-06-04 19:08:12 -04:00
# 1.6.3
2011-06-13 05:45:37 -04:00
2011-06-04 19:08:12 -04:00
- 1.6.2 was yanked
2010-09-16 09:59:41 -04:00
# 1.6.2
- add support for HEAD in resources (patch provided by tpresa)
2010-11-04 16:15:32 -04:00
- fix shell for 1.9.2
- workaround when some gem monkeypatch net/http (patch provided by Ian Warshak)
2010-11-10 12:10:31 -05:00
- DELETE requests should process parameters just like GET and HEAD
2010-12-07 13:50:54 -05:00
- adding :block_response parameter for manual processing
2011-01-21 04:08:06 -05:00
- limit number of redirections (patch provided by Chris Dinn)
- close and unlink the temp file created by playload (patch provided by Chris Green)
2011-05-06 11:07:00 -04:00
- make gemspec Rubygems 1.8 compatible (patch provided by David Backeus)
2011-05-06 11:26:05 -04:00
- added RestClient.reset_before_execution_procs (patch provided by Cloudify)
2011-04-29 18:17:47 -04:00
- added PATCH method (patch provided by Jeff Remer)
2011-06-04 18:35:46 -04:00
- hack for HTTP servers that use raw DEFLATE compression, see http://www.ruby-forum.com/topic/136825 (path provided by James Reeves)
2010-09-16 09:59:41 -04:00
2010-07-02 12:36:49 -04:00
# 1.6.1
- add response body in Exception#inspect
2010-07-02 17:21:32 -04:00
- add support for RestClient.options
2010-07-03 07:30:06 -04:00
- fix tests for 1.9.2 (patch provided by Niko Dittmann)
2010-07-03 07:30:58 -04:00
- block passing in Resource#[] (patch provided by Niko Dittmann)
2010-07-04 14:36:16 -04:00
- cookies set in a response should be kept in a redirect
2010-07-23 16:46:14 -04:00
- HEAD requests should process parameters just like GET (patch provided by Rob Eanes)
2011-01-21 04:08:06 -05:00
- exception message should never be nil (patch provided by Michael Klett)
2010-07-02 12:36:49 -04:00
2010-05-18 14:00:09 -04:00
# 1.6.0
2010-05-17 12:23:45 -04:00
- forgot to include rest-client.rb in the gem
2010-05-18 14:00:09 -04:00
- user, password and user-defined headers should survive a redirect
2010-05-31 13:49:44 -04:00
- added all missing status codes
2010-05-25 14:05:41 -04:00
- added parameter passing for get request using the :param key in header
2010-05-31 13:52:30 -04:00
- the warning about the logger when using a string was a bad idea
2010-05-31 14:53:37 -04:00
- multipart parameters names should not be escaped
2010-06-03 15:18:48 -04:00
- remove the cookie escaping introduced by migrating to CGI cookie parsing in 1.5.1
2010-06-18 19:28:52 -04:00
- add a streamed payload type (patch provided by Caleb Land)
2010-06-26 05:02:23 -04:00
- Exception#http_body works even when no response
2010-05-17 12:23:45 -04:00
2010-04-30 13:02:36 -04:00
# 1.5.1
- only converts headers keys which are Symbols
2010-04-30 14:31:24 -04:00
- use CGI for cookie parsing instead of custom code
2010-05-07 09:21:05 -04:00
- unescape user and password before using them (patch provided by Lars Gierth)
2010-05-09 11:04:34 -04:00
- expand ~ in ~/.restclientrc (patch provided by Mike Fletcher)
2010-05-13 12:56:56 -04:00
- ssl verification raise an exception when the ca certificate is incorrect (patch provided by Braintree)
2010-04-30 13:02:36 -04:00
2010-03-29 13:38:23 -04:00
# 1.5.0
2010-03-19 15:49:26 -04:00
2010-04-23 16:39:47 -04:00
- the response is now a String with the Response module a.k.a. the change in 1.4.0 was a mistake (Response.body is returning self for compatability)
2010-03-29 13:38:23 -04:00
- added AbstractResponse.to_i to improve semantic
2010-03-22 13:43:41 -04:00
- multipart Payloads ignores the name attribute if it's not set (patch provided by Tekin Suleyman)
2010-03-28 04:58:21 -04:00
- correctly takes into account user headers whose keys are strings (path provided by Cyril Rohr)
2010-04-12 07:22:47 -04:00
- use binary mode for payload temp file
2010-04-15 12:23:34 -04:00
- concatenate cookies with ';'
2010-04-15 13:26:33 -04:00
- fixed deeper parameter handling
2010-04-23 15:53:00 -04:00
- do not quote the boundary in the Content-Type header (patch provided by W. Andrew Loe III)
2010-03-19 15:49:26 -04:00
2010-03-13 13:04:04 -05:00
# 1.4.2
2010-03-05 19:55:56 -05:00
- fixed RestClient.add_before_execution_proc (patch provided by Nicholas Wieland)
2010-03-13 13:04:04 -05:00
- fixed error when an exception is raised without a response (patch provided by Caleb Land)
2010-03-05 19:55:56 -05:00
2010-03-05 13:30:51 -05:00
# 1.4.1
2010-03-02 14:21:04 -05:00
2010-03-05 13:30:51 -05:00
- fixed parameters managment when using hash
2010-03-02 14:21:04 -05:00
2010-01-29 15:27:39 -05:00
# 1.4.0
- 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.
2010-01-31 04:44:03 -05:00
- enable repeated parameters RestClient.post 'http://example.com/resource', :param1 => ['one', 'two', 'three'], => :param2 => 'foo' (patch provided by Rodrigo Panachi)
2010-02-06 00:48:44 -05:00
- fixed the redirect code concerning relative path and query string combination (patch provided by Kevin Read)
2010-02-13 06:00:50 -05:00
- redirection code moved to Response so redirection can be customized using the block syntax
2010-02-10 15:31:59 -05:00
- only get and head redirections are now followed by default, as stated in the specification
2010-02-16 13:03:44 -05:00
- added RestClient.add_before_execution_proc to hack the http request, like for oauth
2010-01-29 15:27:39 -05:00
The response change may be breaking in rare cases.
2010-02-10 12:50:05 -05:00
# 1.3.1
- added compatibility to enable responses in exception to act like Net::HTTPResponse
2010-01-23 00:19:45 -05:00
# 1.3.0
2010-01-09 05:20:49 -05:00
2010-01-22 15:04:49 -05:00
- a block can be used to process a request's result, this enable to handle custom error codes or paththrought (design by Cyril Rohr)
2010-01-09 05:20:49 -05:00
- cleaner log API, add a warning for some cases but should be compatible
2010-01-20 13:24:26 -05:00
- accept multiple "Set-Cookie" headers, see http://www.ietf.org/rfc/rfc2109.txt (patch provided by Cyril Rohr)
2010-01-11 12:04:32 -05:00
- remove "Content-Length" and "Content-Type" headers when following a redirection (patch provided by haarts)
2010-01-25 13:37:20 -05:00
- 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
2010-01-23 00:19:45 -05:00
- changed "Content-Disposition: multipart/form-data" to "Content-Disposition: form-data" per RFC 2388 (patch provided by Kyle Crawford)
2010-01-09 05:20:49 -05:00
2010-01-29 15:27:39 -05:00
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.
2010-01-03 16:36:54 -05:00
# 1.2.0
2009-12-29 14:37:25 -05:00
- formatting changed from tabs to spaces
- logged requests now include generated headers
- accept and content-type headers can now be specified using extentions: RestClient.post "http://example.com/resource", { 'x' => 1 }.to_json, :content_type => :json, :accept => :json
2010-01-03 16:48:02 -05:00
- should be 1.1.1 but renamed to 1.2.0 because 1.1.X versions has already been packaged on Debian
2009-12-29 14:37:25 -05:00
2009-12-29 12:04:58 -05:00
# 1.1.0
- new maintainer: Archiloque, the working repo is now at http://github.com/archiloque/rest-client
- a mailing list has been created at rest.client@librelist.com and an freenode irc channel #rest -client
- François Beausoleil' multipart code from http://github.com/francois/rest-client has been merged
- ability to use hash in hash as payload
- the mime-type code now rely on the mime-types gem http://mime-types.rubyforge.org/ instead of an internal partial list
- 204 response returns a Response instead of nil (patch provided by Elliott Draper)
All changes exept the last one should be fully compatible with the previous version.
2014-04-25 21:36:44 -04:00
NOTE: due to a dependency problem and to the last change, heroku users should update their heroku gem to >= 1.5.3 to be able to use this version.