Sha256: da281090014098aad5f5a7776bc59d7beb1bdb8ca3978d6ccaa077192c35f6a1

Contents?: true

Size: 432 Bytes

Versions: 8

Compression:

Stored size: 432 Bytes

Contents

# frozen_string_literal: true

require "rest_client"
module CoreDns
  module Helpers
    class RequestHelper
      def self.request(url, method, params = {}, payload = {})
        params = { url: url, method: method,  headers: params }
        params[:payload] = payload if %i[post put].include?(method)
        params[:verify_ssl] = OpenSSL::SSL::VERIFY_NONE
        RestClient::Request.execute(params)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
coredns-1.2.4 lib/helpers/request_helper.rb
coredns-1.2.3 lib/helpers/request_helper.rb
coredns-1.0.3 lib/helpers/request_helper.rb
coredns-1.2.1 lib/helpers/request_helper.rb
coredns-1.2.0 lib/helpers/request_helper.rb
coredns-1.0.2 lib/helpers/request_helper.rb
coredns-1.0.1 lib/helpers/request_helper.rb
coredns-1.0 lib/helpers/request_helper.rb