Skip to main content

URL Params

Making url parameters in SpiderWren is very simple All you need to do is prefix the parameter with a colon, and it will get passed to your handler as a map

index.wren
import "web" for Routes, App
Routes.GET("/greet/:name") { | params |
return "Hello, %(params["name"]!"
}
App.run(3000)

Try running this example, and navigating to http://localhost:3000/greet/Nailuj!