38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/ree_lib/packages/ree_http/package/ree_http/functions/build_request_executor.rb', line 38
def call(uri, **opts)
opts = DEFAULTS.merge(opts)
proxy = opts[:proxy] || {}
request_executor = Net::HTTP.new(
uri.hostname, uri.port ,
proxy[:address], proxy[:port], proxy[:username], proxy[:password]
)
request_executor.write_timeout = opts[:write_timeout]
request_executor.read_timeout = opts[:timeout]
request_executor.use_ssl = opts[:force_ssl] || uri.scheme == HTTPS_STR
if opts[:ca_certs?]
request_executor = build_ca_certs(request_executor, opts[:ca_certs?])
end
request_executor
end
|