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