lib/exlibris/primo/web_service/client/base/savon_client.rb in exlibris-primo-2.0.0 vs lib/exlibris/primo/web_service/client/base/savon_client.rb in exlibris-primo-2.1.0
- old
+ new
@@ -9,12 +9,23 @@
#
# We're not using WSDL at the moment, since
# we don't want to make an extra HTTP call.
#
# @client ||= Savon.client(wsdl: wsdl)
- @client ||= Savon.client(endpoint: endpoint, namespace: endpoint, log: false, log_level: :warn)
+ @client ||= Savon.client(client_options)
end
protected :client
+
+ def client_options
+ {
+ proxy: proxy_url,
+ endpoint: endpoint,
+ namespace: endpoint,
+ log: false,
+ log_level: :warn
+ }.delete_if { |k, v| v.blank? }
+ end
+ private :client_options
end
end
end
end
end
\ No newline at end of file