Class: Raven::Transports::HTTP
- Defined in:
- lib/raven/transports/http.rb
Instance Attribute Summary
Attributes inherited from Transport
Instance Method Summary collapse
Methods inherited from Transport
Constructor Details
This class inherits a constructor from Raven::Transports::Transport
Instance Method Details
#send(auth_header, data, options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/raven/transports/http.rb', line 10 def send(auth_header, data, = {}) project_id = self.configuration[:project_id] path = self.configuration[:path].gsub('/sentry', '') + "/" response = conn.post "#{path}api/#{project_id}/store/" do |req| req.headers['Content-Type'] = [:content_type] req.headers['X-Sentry-Auth'] = auth_header req.body = data end Raven.logger.warn "Error from Sentry server (#{response.status}): #{response.body}" unless response.status == 200 end |