Sha256: 75ea4809394530c11c4e3783ffcf1f9740f779cf2b7f4a1a01ade266dd6bfaed

Contents?: true

Size: 318 Bytes

Versions: 2

Compression:

Stored size: 318 Bytes

Contents

require 'rest-client'

module Rsyslibs
  class Request
    API_BASE_URL = 'https://rsyslibsapi.herokuapp.com'.freeze

    def self.api(method, path, payload, headers)
      url = "#{API_BASE_URL}#{path}"
      RestClient::Request.execute(method: method, url: url, payload: payload, headers: headers)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rsyslibs-0.3.0 lib/rsyslibs/request.rb
rsyslibs-0.2.0 lib/rsyslibs/request.rb