Class: Raven::Transports::HTTP
Instance Attribute Summary
Attributes inherited from Transport
#configuration
Instance Method Summary
collapse
Methods inherited from Transport
#initialize
Instance Method Details
#send(auth_header, data, options = {}) ⇒ Object
22
23
24
25
26
|
# File 'lib/raven/transports/http.rb', line 22
def send(, data, options = {})
Raven.logger.warn "DEPRECATION WARNING: Calling #send on a Transport will be \
removed in Raven-Ruby 0.14! Use #send_event instead!"
send_event(, data, options)
end
|
#send_event(auth_header, data, options = {}) ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/raven/transports/http.rb', line 9
def send_event(, data, options = {})
project_id = self.configuration[:project_id]
path = self.configuration[:path] + "/"
response = conn.post "#{path}api/#{project_id}/store/" do |req|
req.['Content-Type'] = options[:content_type]
req.['X-Sentry-Auth'] =
req.body = data
end
Raven.logger.warn "Error from Sentry server (#{response.status}): #{response.body}" unless response.status == 200
response
end
|