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-3.1.2 lib/jets/mega/request/source.rb
jets-3.1.1 lib/jets/mega/request/source.rb
jets-3.1.0 lib/jets/mega/request/source.rb
jets-3.0.23 lib/jets/mega/request/source.rb
jets-3.0.22 lib/jets/mega/request/source.rb
jets-3.0.21 lib/jets/mega/request/source.rb
jets-3.0.20 lib/jets/mega/request/source.rb
jets-3.0.19 lib/jets/mega/request/source.rb
jets-3.0.18 lib/jets/mega/request/source.rb
jets-3.0.17 lib/jets/mega/request/source.rb
jets-3.0.16 lib/jets/mega/request/source.rb
jets-3.0.15 lib/jets/mega/request/source.rb
jets-3.0.14 lib/jets/mega/request/source.rb
jets-3.0.13 lib/jets/mega/request/source.rb
jets-3.0.12 lib/jets/mega/request/source.rb
jets-3.0.11 lib/jets/mega/request/source.rb
jets-3.0.10 lib/jets/mega/request/source.rb
jets-3.0.9 lib/jets/mega/request/source.rb
jets-3.0.8 lib/jets/mega/request/source.rb
jets-3.0.7 lib/jets/mega/request/source.rb