ArnaudBuchholz / reserve

Lightweight http server configurable using regular expressions
MIT License
21 stars 6 forks source link

Offer a standard way to get URL parameters in `custom` handler #88

Closed ArnaudBuchholz closed 9 months ago

ArnaudBuchholz commented 9 months ago

Since the order of parameters might change, it would be simpler to provide an instance of UrlSearchParams as the last parameter of the custom function.

NOTE it must be added after the capturing groups

ArnaudBuchholz commented 9 months ago

It would be simpler / faster to create an helper

ArnaudBuchholz commented 9 months ago

Very little value to create such an helper since it would wrap URLParser and UrlSearchParams, will rather document a best practice on how to match such URLs and extract parameters