Sha256: 262cf57810a0bc865f8911d145eb03f2aecefcad6051d27ee67edfd48fd4b370

Contents?: true

Size: 360 Bytes

Versions: 2

Compression:

Stored size: 360 Bytes

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
request-tracer-0.5.3 lib/request_tracer/integration/rest_client_handler.rb
request-tracer-0.5.2 lib/request_tracer/integration/rest_client_handler.rb