1class App 2 def on_req(env) 3 resp = env.resp 4 5 resp.clear_headers 6 resp.status = 404 7 resp.add_header "from", "mruby" 8 resp.return "Hello World from req" 9 end 10end 11 12App.new 13