Sha256: 8cf6a055a91755976a9c2729ee1656e10235087481dae2c8b2f02bf276afcecd
Contents?: true
Size: 588 Bytes
Versions: 410
Compression:
Stored size: 588 Bytes
Contents
module ApiRequestHelper def stub_api_request(config, path, body = nil) options = { :query => { :api_key => config[:push_api_key], :name => config[:name], :environment => config.env, :hostname => config[:hostname], :gem_version => Appsignal::VERSION }, :headers => { "Content-Type" => "application/json; charset=UTF-8" } } body = Appsignal::Utils::JSON.generate(body) if body.is_a? Hash options[:body] = body if body stub_request(:post, "#{config[:endpoint]}/1/#{path}").with(options) end end
Version data entries
410 entries across 410 versions & 1 rubygems