14
15
16
17
18
19
20
21
22
23
|
# File 'lib/excepty/connector.rb', line 14
def self.call( url, data = {}, = nil)
arr = []
arr.push( "key=#{ Excepty::Settings.config[:key] }" )
arr.push( "pv=#{ Excepty::Settings::PROTOCOL_VERSION }" )
arr += .map{ |k,v| "#{k.to_s}=#{v.to_s}" } unless .blank?
url_with_params = url.to_s + "?#{ arr.join("&") }"
data_compressed = Zlib::Deflate.deflate( data.to_json, Zlib::BEST_SPEED )
data_formatted = Base64.encode64( data_compressed )
return start_call( url_with_params, data_formatted )
end
|