Sha256: bb644ac3b5e4a732b917bd9aa83de0addadc631295a5636f428d5ded3f59d1e5

Contents?: true

Size: 431 Bytes

Versions: 10

Compression:

Stored size: 431 Bytes

Contents

require_relative 'base'
require_relative '../trace'
module RequestTracer
  module Integration
    module RestClientHandler
      include Base
      extend self
      def activate
        require 'rest-client'
        RestClient.add_before_execution_proc do |req, params|
          Trace.record do |trace|
            extract_headers_from_fields(trace).each {|h, v| req[h] = v}
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
request-tracer-0.7.0 lib/request_tracer/integration/rest_client_handler.rb
request-tracer-0.6.6 lib/request_tracer/integration/rest_client_handler.rb
request-tracer-0.6.5 lib/request_tracer/integration/rest_client_handler.rb
request-tracer-0.6.4 lib/request_tracer/integration/rest_client_handler.rb
request-tracer-0.6.3 lib/request_tracer/integration/rest_client_handler.rb
request-tracer-0.6.2 lib/request_tracer/integration/rest_client_handler.rb
request-tracer-0.6.1 lib/request_tracer/integration/rest_client_handler.rb
request-tracer-0.5.8 lib/request_tracer/integration/rest_client_handler.rb
request-tracer-0.5.6 lib/request_tracer/integration/rest_client_handler.rb
request-tracer-0.5.5 lib/request_tracer/integration/rest_client_handler.rb