Sha256: db55abb0c9b75d8b2efd21463177cda45a8a262d388924379af373216abef3b8

Contents?: true

Size: 482 Bytes

Versions: 185

Compression:

Stored size: 482 Bytes

Contents

class Jets::Mega::Request
  class Source
    def initialize(event)
      @event = event
      env = Jets::Controller::Rack::Env.new(@event, {}).convert # convert to Rack env
      @source_request = Rack::Request.new(env)
    end

    def body
      if @source_request.body.respond_to?(:read)
        body = @source_request.body.read
        @source_request.body.rewind
      end
      body
    end

    def content_length
      @source_request.content_length.to_i
    end
  end
end

Version data entries

185 entries across 185 versions & 4 rubygems

Version Path
jets-4.0.12 lib/jets/mega/request/source.rb
jets-4.0.11 lib/jets/mega/request/source.rb
jets-4.0.10 lib/jets/mega/request/source.rb
jets-4.0.9 lib/jets/mega/request/source.rb
jets-4.0.8 lib/jets/mega/request/source.rb
jets-4.0.7 lib/jets/mega/request/source.rb
jets-4.0.6 lib/jets/mega/request/source.rb
jets-4.0.5 lib/jets/mega/request/source.rb
jets-4.0.4 lib/jets/mega/request/source.rb
jets-4.0.3 lib/jets/mega/request/source.rb
jets-4.0.2 lib/jets/mega/request/source.rb
jets-4.0.1 lib/jets/mega/request/source.rb
jets-4.0.0 lib/jets/mega/request/source.rb
jets-3.2.2 lib/jets/mega/request/source.rb
jets-3.2.1 lib/jets/mega/request/source.rb
jets.benforeva-3.0.17.pre.mount.pre.fix lib/jets/mega/request/source.rb
jets-3.2.0 lib/jets/mega/request/source.rb
jets-3.1.5 lib/jets/mega/request/source.rb
jets-3.1.4 lib/jets/mega/request/source.rb
jets-3.1.3 lib/jets/mega/request/source.rb