Open CreateChen opened 6 years ago
I guess you will have to use wildcard pattern and extract that id from url manually (like using regex group).
Why not use the static file handler?
Because the .html is dynamic page :-)
Some search engines prefer url end with .html, and give the domain a higher weight.
I have the same problem. For REST APIs I like to define an output type like HTML, JSON, CSV and so on. I don't understand why such a basic functionality is not part of the route engine.
Code like this:
get("/article/:id.html", (request, response)->{ return request.params(":id"); });