Sha256: dd65ab43813b4779d786300848955439751d6cf91accd635f305a7d557e5e00f

Contents?: true

Size: 496 Bytes

Versions: 34

Compression:

Stored size: 496 Bytes

Contents

require 'unleash/bootstrap/provider/base'

module Unleash
  module Bootstrap
    module Provider
      class FromUrl < Base
        # @param url [String]
        # @param headers [Hash, nil] HTTP headers to use. If not set, the unleash client SDK ones will be used.
        def self.read(url, headers = nil)
          response = Unleash::Util::Http.get(URI.parse(url), nil, headers)

          return nil if response.code != '200'

          response.body
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
unleash-6.0.9 lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.8 lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.8.beta.1 lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.7 lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.6 lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.5 lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.0 lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.5.pre lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.4.pre lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.3.pre lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.2.pre lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.1.pre lib/unleash/bootstrap/provider/from_url.rb
unleash-6.0.0.pre lib/unleash/bootstrap/provider/from_url.rb
unleash-5.1.1 lib/unleash/bootstrap/provider/from_url.rb
unleash-5.1.0 lib/unleash/bootstrap/provider/from_url.rb
unleash-5.0.7 lib/unleash/bootstrap/provider/from_url.rb
unleash-5.0.6 lib/unleash/bootstrap/provider/from_url.rb
unleash-5.0.5 lib/unleash/bootstrap/provider/from_url.rb
unleash-5.0.4 lib/unleash/bootstrap/provider/from_url.rb
unleash-5.0.3 lib/unleash/bootstrap/provider/from_url.rb