Sha256: f9d9f79d0c12796122e8134fbf814813d02851d05d1df7fee30d8c8d2a072cf5

Contents?: true

Size: 269 Bytes

Versions: 22

Compression:

Stored size: 269 Bytes

Contents

require 'rest-core/middleware'

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

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rest-core-1.0.3 lib/rest-core/middleware/default_headers.rb
rest-core-1.0.2 lib/rest-core/middleware/default_headers.rb
rest-core-1.0.1 lib/rest-core/middleware/default_headers.rb
rest-core-1.0.0 lib/rest-core/middleware/default_headers.rb
rest-core-0.8.2 lib/rest-core/middleware/default_headers.rb
rest-core-0.8.1 lib/rest-core/middleware/default_headers.rb
rest-core-0.8.0 lib/rest-core/middleware/default_headers.rb
rest-core-0.7.2 lib/rest-core/middleware/default_headers.rb
rest-core-0.7.0 lib/rest-core/middleware/default_headers.rb
rest-core-0.4.0 lib/rest-core/middleware/default_headers.rb
rest-core-0.4.0.pre.2 lib/rest-core/middleware/default_headers.rb
rest-core-0.4.0.pre.1 lib/rest-core/middleware/default_headers.rb
rest-core-0.4.0.pre.0 lib/rest-core/middleware/default_headers.rb
rest-core-0.3.0 lib/rest-core/middleware/default_headers.rb
rest-core-0.3.0.pre.2 lib/rest-core/middleware/default_headers.rb
rest-core-0.3.0.pre.1 lib/rest-core/middleware/default_headers.rb
rest-core-0.3.0.pre.0 lib/rest-core/middleware/default_headers.rb
rest-core-0.2.3 lib/rest-core/middleware/default_headers.rb
rest-core-0.2.2 lib/rest-core/middleware/default_headers.rb
rest-core-0.2.1 lib/rest-core/middleware/default_headers.rb