git.iko.soy/typeable/servant-reflex
on set-withCredentials help sign in
32 lines 1.4 kB history raw
10.3
2---
4- **Addition of the 'Servant.Reflex.Multi' module** which allows the user
5to choose some '(Applicative f, Traversable f) => f' for collecting
6endpoint parameters. The traversable instance is used for passing
7multiple 'XhrRequest's in response to a single event trigger. The
8Applicative instance is used to combine parameters. For example,
9'Capture "id" Name :> QueryParam "greeting" Text :> Get '[JSON] Text'
10will generate a client function:
11`Dynamic t (f Name) -> Dynamic t (f greeting) -> Event t tag ->
12 m (Event t (f (ReqResult tag Text)))`
13Calling that function with 'f' chosen to be list ('[]'), this call
14`clientFun
15(constDyn ["Greg", "Bernie"])
16(constDyn ["Greetings", "Hey"])
17trigger`
18would produce four XhrRequests per 'trigger' event, one for each
19combination of possible parameters, and one response event
20would carry a list of the four responses.
21A 'zip-wise' combination of the parameters can be chosen with
22a different applicative wrapper: 'ZipList'
24- **Event tags**. A new type parameter lets users choose a payload
25value to attach to outgoing requests at the point of triggering,
26and which is embedded in the response, allowing individual
27request-response pairs to be followed. The response's tag has been
28added to each constructor `ReqResult tag a` type.
30- **Improved Unicode support** Thanks to Schell Scivally
31(https://github.com/schell) for identifying and fixing a UTF-8
32encoding bug!