Sha256: 63363402cb6866893d4fb9014dc6348cf503860fee565d85b3e0cd43d0c8afb4

Contents?: true

Size: 277 Bytes

Versions: 5

Compression:

Stored size: 277 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

5 entries across 5 versions & 1 rubygems

Version Path
rest-core-2.0.4 lib/rest-core/middleware/default_headers.rb
rest-core-2.0.3 lib/rest-core/middleware/default_headers.rb
rest-core-2.0.2 lib/rest-core/middleware/default_headers.rb
rest-core-2.0.1 lib/rest-core/middleware/default_headers.rb
rest-core-2.0.0 lib/rest-core/middleware/default_headers.rb