Sha256: c84e40d872c0badd941f1a387582ca7075178963fcc550ce5d4c2c1d33c4e33b
Contents?: true
Size: 717 Bytes
Versions: 8
Compression:
Stored size: 717 Bytes
Contents
# frozen_string_literal: true module Gupshup module REST class Domain attr_reader :client def initialize(client) @client = client @host = nil @base_url = nil @port = nil end def absolute_url(uri) "#{@base_url.chomp('/')}/#{uri.chomp('/').gsub(/^\//, '')}" end def request(method, uri, params = {}, data = {}, headers = {}, auth = nil, timeout = nil) url = uri.match(/^http/) ? uri : absolute_url(uri) @client.request( @base_url, @port, method, url, params, data, headers, auth, timeout ) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems