Sha256: 64a4c84a0549fc6b829a6d2cf1f4ba13aed1372d82c341e91feecfd2288580f6

Contents?: true

Size: 495 Bytes

Versions: 33

Compression:

Stored size: 495 Bytes

Contents

require 'sinatra'
require File.join(File.dirname(__FILE__), 'webrick_patch')

class Basic < Sinatra::Base
  set :environment, :production
  enable :dump_errors

  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

  get('/echo dirty') do
    echo
  end

  private

  def echo
    request.body.read
  end

end

Version data entries

33 entries across 33 versions & 3 rubygems

Version Path
able-neo4j-1.0.0 vendor/bundle/jruby/1.9/gems/excon-0.45.4/tests/rackups/basic.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/excon-0.45.4/tests/rackups/basic.rb
excon-0.45.4 tests/rackups/basic.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/excon-0.45.3/tests/rackups/basic.rb
excon-0.45.3 tests/rackups/basic.rb
excon-0.45.2 tests/rackups/basic.rb
excon-0.45.1 tests/rackups/basic.rb
excon-0.45.0 tests/rackups/basic.rb
excon-0.44.4 tests/rackups/basic.rb
excon-0.44.3 tests/rackups/basic.rb
excon-0.44.2 tests/rackups/basic.rb
excon-0.44.1 tests/rackups/basic.rb
excon-0.44.0 tests/rackups/basic.rb
excon-0.43.0 tests/rackups/basic.rb
excon-0.42.1 tests/rackups/basic.rb
excon-0.42.0 tests/rackups/basic.rb
excon-0.41.0 tests/rackups/basic.rb
excon-0.40.0 tests/rackups/basic.rb
excon-0.39.6 tests/rackups/basic.rb
excon-0.39.5 tests/rackups/basic.rb