Sha256: dfacf20899b2c69add050f399ce7ab9f1020c5a477e6c928ea9620983c7b8bd7

Contents?: true

Size: 403 Bytes

Versions: 20

Compression:

Stored size: 403 Bytes

Contents

module Shogun
  class Dispatch
    class Payload
      QUERY_KEY = "rack.request.query_hash"

      def initialize(state:, lookup:)
        @body = state[Rack::BodyDeserializer::RACK_KEY] || {}
        @query = state[QUERY_KEY] || {}
        @uri = lookup.payload
        @sections = [state, @uri, @query, @body]
      end

      def to_hash
        @sections.inject(:merge)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
shogun-6.4.2 lib/shogun/dispatch/payload.rb
shogun-6.4.1 lib/shogun/dispatch/payload.rb
shogun-6.4.0 lib/shogun/dispatch/payload.rb
shogun-6.3.0 lib/shogun/dispatch/payload.rb
shogun-6.2.3 lib/shogun/dispatch/payload.rb
shogun-6.2.2 lib/shogun/dispatch/payload.rb
shogun-6.2.1 lib/shogun/dispatch/payload.rb
shogun-6.2.0 lib/shogun/dispatch/payload.rb
shogun-6.1.0 lib/shogun/dispatch/payload.rb
shogun-6.0.0 lib/shogun/dispatch/payload.rb
shogun-4.0.1 lib/shogun/dispatch/payload.rb
shogun-4.0.0 lib/shogun/dispatch/payload.rb
shogun-3.4.0 lib/shogun/dispatch/payload.rb
shogun-3.2.0 lib/shogun/dispatch/payload.rb
shogun-3.1.0 lib/shogun/dispatch/payload.rb
shogun-3.0.0 lib/shogun/dispatch/payload.rb
shogun-2.1.1 lib/shogun/dispatch/payload.rb
shogun-2.1.0 lib/shogun/dispatch/payload.rb
shogun-2.0.0 lib/shogun/dispatch/payload.rb
shogun-1.0.0 lib/shogun/dispatch/payload.rb