Sha256: 74c9a0419bcecffd75f3e51a764992d01fefc881fe101ee7430bed01715acb8c

Contents?: true

Size: 353 Bytes

Versions: 4

Compression:

Stored size: 353 Bytes

Contents

module Checkability
  # Create connection
  #
  class ExternalApiConnector
    attr_reader :path

    def initialize(conf)
      @path = conf[:path]
    end

    def connect
      Faraday.new(url: path) do |faraday|
        faraday.headers['Content-Type'] = 'application/json'
        faraday.adapter Faraday.default_adapter
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
checkability-0.4.1 lib/checkability/external_api_connector.rb
checkability-0.4.0 lib/checkability/external_api_connector.rb
checkability-0.3.0 lib/checkability/external_api_connector.rb
checkability-0.2.0 lib/checkability/external_api_connector.rb