Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/docraptor/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def build_request(http_method, path, opts = {})
:sslcert => @config.cert_file,
:sslkey => @config.key_file,
:verbose => @config.debugging,
:proxy => @config.proxy,
:proxyuserpwd => @config.proxyuserpwd,
:followlocation => follow_location
}

Expand Down
12 changes: 12 additions & 0 deletions lib/docraptor/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ class Configuration
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
attr_accessor :params_encoding

# Proxy URL to pass to Typhoeus.
# Default to nil.
attr_accessor :proxy

# Proxy username & password to pass to Typhoeus.
# Format as `username:password`.
#
# Default to nil.
attr_accessor :proxyuserpwd


attr_accessor :inject_format

Expand All @@ -155,6 +165,8 @@ def initialize
@key_file = nil
@timeout = 0
@params_encoding = nil
@proxy = nil
@proxyuserpwd = nil
@debugging = false
@inject_format = false
@force_ending_format = false
Expand Down