5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'app/services/foreman_rh_cloud/cloud_request.rb', line 5
def execute_cloud_request(params)
final_params = {
verify_ssl: ForemanRhCloud.verify_ssl_method,
proxy: ForemanRhCloud.transformed_http_proxy_string(logger: logger),
}.deep_merge(params)
response = RestClient::Request.execute(final_params)
logger.debug("Response headers for request url #{final_params[:url]} are: #{response.}")
response
rescue RestClient::Exception => ex
logger.debug("Failed response with code #{ex.http_code} headers for request url #{final_params[:url]} are: #{ex.} and body: #{ex.http_body}")
raise ex
end
|