@@ -65,6 +65,7 @@ type API = "getint" :> Get '[JSON] Int
65These client functions are computed from the API and manage serialization, XhrRequest generation, and deserialization for you. `a` parameters become `Behavior t (Maybe a)` values. You provide a trigger event and receive an `Event t (Maybe r, XhrResponse)`, with responses from the API server (which you would write with `servant-server`).
65These client functions are computed from the API and manage serialization, XhrRequest generation, and deserialization for you. `a` parameters become `Behavior t (Maybe a)` values. You provide a trigger event and receive an `Event t (Maybe r, XhrResponse)`, with responses from the API server (which you would write with `servant-server`).
68+ -- No need to write these functions. servant-reflex creates them for you!
68 getint :: MonadWidget t m
69 getint :: MonadWidget t m
69 => Event t () -- ^ Trigger the XHR Request
70 => Event t () -- ^ Trigger the XHR Request
70 -> m (Event t (Maybe (Int, XhrResponse))) -- ^ Consume the answer
71 -> m (Event t (Maybe (Int, XhrResponse))) -- ^ Consume the answer