File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 196196If you see something that could be done better or would like
197197to help out in the development of this code please feel free to clone the
198198'git' repository and send me patches:
199- ` git clone git ://github.com/zenchild /Viewpoint.git `
199+ ` git clone https ://github.com/WinRb /Viewpoint.git `
200200or add an issue on GitHub:
201- http ://github.com/zenchild /Viewpoint/issues
201+ https ://github.com/WinRb /Viewpoint/issues
202202
203203Cheers!
Original file line number Diff line number Diff line change @@ -22,9 +22,11 @@ class Viewpoint::EWS::Connection
2222 include Viewpoint ::EWS
2323
2424 attr_reader :endpoint
25+ @@supported_httpclient_opts = %i[ agent_name default_header ]
26+
2527 # @param [String] endpoint the URL of the web service.
2628 # @example https://<site>/ews/Exchange.asmx
27- # @param [Hash] opts Misc config options (mostly for developement )
29+ # @param [Hash] opts Misc config options (mostly for development )
2830 # @option opts [Fixnum] :ssl_verify_mode
2931 # @option opts [Fixnum] :receive_timeout override the default receive timeout
3032 # seconds
@@ -34,11 +36,9 @@ class Viewpoint::EWS::Connection
3436 # @option opts [String] :user_agent the http user agent to use in all requests
3537 def initialize ( endpoint , opts = { } )
3638 @log = Logging . logger [ self . class . name . to_s . to_sym ]
37- if opts [ :user_agent ]
38- @httpcli = HTTPClient . new ( agent_name : opts [ :user_agent ] )
39- else
40- @httpcli = HTTPClient . new
41- end
39+
40+ httpclient_opts = opts . slice ( *@@supported_httpclient_opts )
41+ @httpcli = HTTPClient . new ( **httpclient_opts )
4242
4343 if opts [ :trust_ca ]
4444 @httpcli . ssl_config . clear_cert_store
You can’t perform that action at this time.
0 commit comments