Sha256: c87b6e04e6b2186864a52401706b199fd7c14a00b6a1ca22e11a412e04268a04

Contents?: true

Size: 269 Bytes

Versions: 5

Compression:

Stored size: 269 Bytes

Contents

require 'rest-core/middleware'

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rest-core-1.0.3 lib/rest-core/middleware/default_payload.rb
rest-core-1.0.2 lib/rest-core/middleware/default_payload.rb
rest-core-1.0.1 lib/rest-core/middleware/default_payload.rb
rest-core-1.0.0 lib/rest-core/middleware/default_payload.rb
rest-core-0.8.2 lib/rest-core/middleware/default_payload.rb