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