I'm trying to implement a REST API using the akka-http low-level API. I need to match a request for paths containing resource ids, for instance, "/users/12", where the 12 is the id of the user.
I'm looking for something along these lines:
case HttpRequest(GET, Uri.Path("/users/$asInt(id)"), _, _, _) =>
// id available as a variable
The "$asInt(id)" is a made up syntax, I'm using it just to describe what I want to do.
I can easily find examples of how to do this with the high level API using routes and directives, but I can't find anything with the low-level API. Is this possible with the low-level API?