Sha256: 66fd86d4a245bfab92a9b6645fe8edf18e2dd0efe9c8b3c1760d5150a6e37936
Contents?: true
Size: 455 Bytes
Versions: 1
Compression:
Stored size: 455 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 private def echo request.body.read end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
excon-0.31.0 | tests/rackups/basic.rb |