Sha256: 7a729e6b05a2ccf0a35d33ca0f627de5d43bc0dfc53b123cc9237783dbb1c773
Contents?: true
Size: 988 Bytes
Versions: 5
Compression:
Stored size: 988 Bytes
Contents
# frozen_string_literal: true module FirebaseDynamicLink # Responsible to do HTTP request class Connection extend Forwardable # @!method post # see Faraday::Connection#post def_delegators :client, :post def initialize(end_point) @client = Faraday::Connection.new(url: end_point, headers: { "Content-Type" => "application/json" }) client.options.timeout = FirebaseDynamicLink.config.timeout client.options.open_timeout = FirebaseDynamicLink.config.open_timeout end # @see Faraday.timeout= def timeout=(time) client.options.timeout = time end # @see Faraday.timeout def timeout client.options.timeout end # @see Faraday.open_timeout= def open_timeout=(time) client.options.open_timeout = time end # @see Faraday.open_timeout def open_timeout client.options.open_timeout end private attr_reader :client end end
Version data entries
5 entries across 5 versions & 1 rubygems