Skip to content

Commit

Permalink
Add docs and change log for :stream_log_percent.
Browse files Browse the repository at this point in the history
  • Loading branch information
ab committed Aug 21, 2019
1 parent f18ca59 commit 3a54b05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions lib/restclient/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3a54b05

Please sign in to comment.