Support for URL parameters
Vapor and Hummingbird both have a great feature where you can specify post parameters as part of the URL/Route using the form:
/ax/objects/:id
Where :id is accessible as a parameter that is replaced by the passed value.
It would be great to have this same support in FlyingFox at some point!
Ah nice, the preview/macro branch provides a glimpse of what I want it to eventually achieve when macros become feasible to use in lightweight packages.
My plan is to eventually match some elements within the route to the handler as named parameters removing the need to force unwrap:
@HTTPRoute("/ax/objects/:id")
func getObject(id: Int) -> HTTPResponse
My imagination had struggled to think up what this future syntax would be maybe {id} but I'm happy to follow prior art here.
I've started an implementation of this that builds on the changes in #91 at: tonyarnold#1
Released in 0.15.0