Sha256: eb3345b1d39072732218139d64ad84df97f0693f1f0ea31b293f4d0140d29d73

Contents?: true

Size: 354 Bytes

Versions: 13

Compression:

Stored size: 354 Bytes

Contents

module Faraday
  module Conductivity
    class RequestId < Faraday::Middleware

      def initialize(app)
        super(app)
      end

      def call(env)
        request_id = Thread.current[:request_id]
        if request_id
          env[:request_headers]['X-Request-Id'] ||= request_id
        end
        @app.call(env)
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
faraday-conductivity-2.0.0 lib/faraday/conductivity/request_id.rb
faraday-conductivity-1.0.1 lib/faraday/conductivity/request_id.rb
faraday-conductivity-1.0.0 lib/faraday/conductivity/request_id.rb
faraday-conductivity-0.3.1 lib/faraday/conductivity/request_id.rb
faraday-conductivity-0.3.0 lib/faraday/conductivity/request_id.rb
faraday-conductivity-0.2.1 lib/faraday/conductivity/request_id.rb
faraday-conductivity-0.2.0 lib/faraday/conductivity/request_id.rb
faraday-conductivity-0.1.1 lib/faraday/conductivity/request_id.rb
faraday-conductivity-0.1.0 lib/faraday/conductivity/request_id.rb
faraday-conductivity-0.0.4 lib/faraday/conductivity/request_id.rb
faraday-conductivity-0.0.3 lib/faraday/conductivity/request_id.rb
faraday-conductivity-0.0.2 lib/faraday/conductivity/request_id.rb
faraday-conductivity-0.0.1 lib/faraday/conductivity/request_id.rb