Sha256: e1cfb95351ccc58a264fe4971db768b8a90c9080dd1b1644167fe26fadbbc847

Contents?: true

Size: 332 Bytes

Versions: 5

Compression:

Stored size: 332 Bytes

Contents

require 'faraday'

# @private
module Faraday
  # @private
  class Request::Gateway < Faraday::Middleware
    def call(env)
      url = env[:url].dup
      url.host = @gateway
      env[:url] = url
      @app.call(env)
    end

    def initialize(app, gateway)
      @app, @gateway = app, gateway
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rainmaker-0.1.5 lib/faraday/request/gateway.rb
rainmaker-0.1.4 lib/faraday/request/gateway.rb
rainmaker-0.1.3 lib/faraday/request/gateway.rb
rainmaker-0.1.1 lib/faraday/request/gateway.rb
rainmaker-0.0.1 lib/faraday/request/gateway.rb