Sha256: f53b5336ad6e7e9d21dfc98dcde6b083080b8a7feee2ffd048d7993aa2f4633f

Contents?: true

Size: 709 Bytes

Versions: 44

Compression:

Stored size: 709 Bytes

Contents

module ForemanRhCloud
  module CloudRequest
    extend ActiveSupport::Concern

    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.headers}")

      response
    rescue RestClient::Exception => ex
      logger.debug("Failed response with code #{ex.http_code} headers for request url #{final_params[:url]} are: #{ex.http_headers} and body: #{ex.http_body}")
      raise ex
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
foreman_rh_cloud-9.0.59 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-11.0.2 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-11.0.1 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-11.0.0 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-9.0.58 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-10.0.2 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-9.0.57 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-10.0.1 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-9.0.56 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-9.0.55 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-9.0.54 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-9.0.53 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-9.0.52 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-8.0.52 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-9.0.51 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-8.0.51 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-7.0.48 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-7.0.47 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-8.0.50 app/services/foreman_rh_cloud/cloud_request.rb
foreman_rh_cloud-8.0.49 app/services/foreman_rh_cloud/cloud_request.rb