Sha256: 85452317b8c0df5fbf23d830aafc0a714bcfe3d532ab7c30db32afe0b0848fff

Contents?: true

Size: 341 Bytes

Versions: 64

Compression:

Stored size: 341 Bytes

Contents

require 'sinatra'

class Basic < Sinatra::Base
  get('/content-length/:value') do |value|
    headers("Custom" => "Foo: bar")
    'x' * value.to_i
  end

  post('/body-sink') do
    request.body.read.size.to_s
  end

  post('/echo') do
    echo
  end

  put('/echo') do
    echo
  end

  private

  def echo
    request.body.read
  end

end

Version data entries

64 entries across 64 versions & 3 rubygems

Version Path
vagrant-shell-0.2.5 vendor/bundle/gems/excon-0.20.1/tests/rackups/basic.rb
excon-0.21.0 tests/rackups/basic.rb
excon-0.20.1 tests/rackups/basic.rb
excon-0.20.0 tests/rackups/basic.rb
excon-0.19.5 tests/rackups/basic.rb
excon-0.19.4 tests/rackups/basic.rb
excon-0.19.3 tests/rackups/basic.rb
excon-0.19.2 tests/rackups/basic.rb
excon-0.19.1 tests/rackups/basic.rb
excon-0.19.0 tests/rackups/basic.rb
excon-0.18.5 tests/rackups/basic.rb
excon-0.18.4 tests/rackups/basic.rb
excon-0.18.3 tests/rackups/basic.rb
excon-0.18.2 tests/rackups/basic.rb
excon-0.18.1 tests/rackups/basic.rb
excon-0.18.0 tests/rackups/basic.rb
excon-0.17.0 tests/rackups/basic.rb
excon-0.16.10 tests/rackups/basic.rb
excon-0.16.9 tests/rackups/basic.rb
excon-0.16.8 tests/rackups/basic.rb