NavyKit uses WEBrick’s Request Object and extracts it.
To get a parameter, use the req.param method.
app.get("/greet/:name") do |req, res|
name = req.param("name")
res.send(200, "Hello, #{name}")
end
To get aa header, use the header method.
req.header("Content-Type")
req.method returns the request method.req.url returns the request URL.