haskell-servant / haskell-servant/servant
Allow access to URL path in a more manageable format
Open
- Dominant language
- Haskell
- Stars
- 2k
- Forks
- 427
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 5
Description
I'm currently writing an implementation of rate limiting for `servant-client`, and it'd be very useful to have access to the current URL path as e.g. a `[PathPiece]` where
```
data PathPiece
= StaticPath Text
| Capture String Text
```
so that I can properly group rate limiting bins by specific `Capture`s.
Ideally, I'd be able to do something like
```
type RateLimitedAPI = "foo" :> "bar" :> Capture "id" Int :> Capture "minor" Int :> RateLimit (IgnoreCapture "minor") :> Post '[JSON] Foo
```
Contributor guide
Assessment
This issue has not been assessed yet.