1{-# LANGUAGE PolyKinds #-}
2module Servant.API.QueryParam where
4-- | Lookup the value associated to the @sym@ query string parameter
5-- and try to extract it as a value of type @a@.
9-- > -- /books?author=<author name>
10-- > type MyApi = "books" :> QueryParam "author" Text :> Get [Book]
13-- | Lookup the values associated to the @sym@ query string parameter
14-- and try to extract it as a value of type @[a]@. This is typically
15-- meant to support query string parameters of the form
16-- @param[]=val1¶m[]=val2@ and so on. Note that servant doesn't actually
17-- require the @[]@s and will fetch the values just fine with
18-- @param=val1¶m=val2@, too.
22-- > -- /books?authors[]=<author1>&authors[]=<author2>&...
23-- > type MyApi = "books" :> QueryParams "authors" Text :> Get [Book]
26-- | Lookup a potentially value-less query string parameter
27-- with boolean semantics. If the param @sym@ is there without any value,
28-- or if it's there with value "true" or "1", it's interpreted as 'True'.
29-- Otherwise, it's interpreted as 'False'.
33-- > -- /books?published
34-- > type MyApi = "books" :> QueryFlag "published" :> Get [Book]
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list