diff --git a/history.md b/history.md index 9108c2c..0ad197c 100644 --- a/history.md +++ b/history.md @@ -11,6 +11,10 @@ `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` + - 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) diff --git a/lib/restclient/request.rb b/lib/restclient/request.rb index 57e9c4f..5c78cc5 100644 --- a/lib/restclient/request.rb +++ b/lib/restclient/request.rb @@ -28,6 +28,11 @@ module RestClient # * :user and :password for basic auth, will be replaced by a user/password available in the :url # * :block_response call the provided block with the HTTPResponse as parameter # * :raw_response return a low-level RawResponse instead of a Response + # * :log Set the log for this request only, overriding RestClient.log, if + # any. + # * :stream_log_percent (Only relevant with :raw_response => true) Customize + # the interval at which download progress is logged. Defaults to every + # 10% complete. # * :max_redirects maximum number of redirections (default to 10) # * :proxy An HTTP proxy URI to use for this request. Any value here # (including nil) will override RestClient.proxy.