Sha256: dafb98078e19c39da589dbf805cc30d0e60dad4e0ca3268e77b461e3f3c121a2

Contents?: true

Size: 271 Bytes

Versions: 7

Compression:

Stored size: 271 Bytes

Contents

require 'rest-core/middleware'

class RestCore::DefaultHeaders
  def self.members; [:headers]; end
  include RestCore::Middleware
  def call env, &k
    app.call(env.merge(REQUEST_HEADERS =>
      @headers.merge(headers(env)).merge(env[REQUEST_HEADERS])), &k)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rest-core-3.2.0 lib/rest-core/middleware/default_headers.rb
rest-core-3.1.1 lib/rest-core/middleware/default_headers.rb
rest-core-3.1.0 lib/rest-core/middleware/default_headers.rb
rest-core-3.0.0 lib/rest-core/middleware/default_headers.rb
rest-core-2.1.2 lib/rest-core/middleware/default_headers.rb
rest-core-2.1.1 lib/rest-core/middleware/default_headers.rb
rest-core-2.1.0 lib/rest-core/middleware/default_headers.rb