Sha256: 0690f8eea6d60ac85014748adb4e682d71c29a9aa850f95b1709f6197e998248
Contents?: true
Size: 457 Bytes
Versions: 1
Compression:
Stored size: 457 Bytes
Contents
# frozen_string_literal: true module SdrClient # The connection to the server class Connection def initialize(url:, token: Credentials.read) @url = url @token = token end def connection @connection ||= Faraday.new(url: url) do |conn| conn.authorization :Bearer, token conn.adapter :net_http end end delegate :put, :post, to: :connection private attr_reader :url, :token end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sdr-client-0.19.0 | lib/sdr_client/connection.rb |