class Sinatra::Base

def forward

Forward the request to the downstream app -- middleware only.
def forward
  fail "downstream app not set" unless @app.respond_to? :call
  status, headers, body = @app.call env
  @response.status = status
  @response.body = body
  @response.headers.merge! headers
  nil
end