a2-in-memory-web-api
a2-in-memory-web-api copied to clipboard
complex resource paths
support for
`/api/customer/32/orders`
`/api/customer/32/orders/451`
`/api/customer/address`
We take PRs ;-)
I agree it would be nice. Do you have the use case now?
I'd like the solution to be support almost any request url scheme.
My instinct is to add a configurable route/response map where the response is a function with access to the in-mem datastore, original request, parsed request, and response-building helper functions.
We'll need a route recognizer for request url pattern matching and parsing of parameters.
The current route handling would become the initial, default state of this map.