haskell-servant / haskell-servant/servant
Add QueryParamForm
- Dominant language
- Haskell
- Stars
- 2k
- Forks
- 427
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 5
Description
CaptureAll is exist, but QueryParamAll is not.
I suggest *QueryParamAll* to get all list of query params.
```hs
-- /books?title=eq.servant&category=eq.haskell
data QueryParamAll a b
type MyApi = "books" :> QueryParamAll ByteString ByteString :> Get '[JSON] [Book]
books :: [(ByteString, Maybe ByteString)] -> AppHandler ByteString
books filter = ...
```
I think it is not hard to implement this because [QueryParam](https://github.com/haskell-servant/servant/blob/master/servant-server/src/Servant/Server/Internal.hs#L316) alreay do [parseQueryText](https://hackage.haskell.org/package/http-types-0.9.1/docs/Network-HTTP-Types.html#v:parseQueryText)
Contributor guide
Assessment
This issue has not been assessed yet.