Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- request :: forall (es :: [Effect]). Hyperbole :> es => Eff es Request
- reqPath :: forall (es :: [Effect]). Hyperbole :> es => Eff es [Segment]
- formBody :: forall (es :: [Effect]). Hyperbole :> es => Eff es Form
- reqParams :: forall (es :: [Effect]). Hyperbole :> es => Eff es QueryText
- reqParam :: forall a (es :: [Effect]). (Hyperbole :> es, FromHttpApiData a) => Text -> Eff es a
- lookupParam :: forall a (es :: [Effect]). (Hyperbole :> es, FromHttpApiData a) => Text -> Eff es (Maybe a)
- hasParam :: Text -> QueryText -> Bool
Documentation
request :: forall (es :: [Effect]). Hyperbole :> es => Eff es Request Source #
Return all information about the Request
reqPath :: forall (es :: [Effect]). Hyperbole :> es => Eff es [Segment] Source #
Return the request path
>>>
reqPath
["users", "100"]
formBody :: forall (es :: [Effect]). Hyperbole :> es => Eff es Form Source #
Return the request body as a Web.FormUrlEncoded.Form
Prefer using Type-Safe Form
s when possible
reqParams :: forall (es :: [Effect]). Hyperbole :> es => Eff es QueryText Source #
Return the entire Query
myPage ::Page
esResponse
myPage = doload
$ do q <- reqParams caselookupParam
"token" q of Nothing -> pure $ errorView "Missing Token in Query String" Just t -> do sideEffectUsingToken token pure myPageView
reqParam :: forall a (es :: [Effect]). (Hyperbole :> es, FromHttpApiData a) => Text -> Eff es a Source #
lookupParam :: forall a (es :: [Effect]). (Hyperbole :> es, FromHttpApiData a) => Text -> Eff es (Maybe a) Source #