haskell-servant / haskell-servant/servant

Allow access to URL path in a more manageable format

Open
#879 6 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.