require 'sinatra/base' module Sinatra module ResponseHeaderHelpers def allow(*methods) response.headers['Allow'] = methods.join(", ").upcase end def challenge(realm) response.headers['WWW-Authenticate'] = realm end def location(location) response.headers['Location'] = location end end helpers ResponseHeaderHelpers end