Module
Erl.Cowboy.Req
- Package
- erl-cowboy
- Repository
- purerl/purescript-erl-cowboy
Bindings for cowboy_req
The Req
type (corresponding to req()
) is core to the use of cowboy, containing information about request and response.
Many functions operating on Req
are pure, producing an updated Req
if required to update some fields, e.g. when setting a
header, but others produce a result in Effect
as even though they may update the Req
, they also cause side-effects such as
sending traffic on the network (eg reply
).
#replyWithoutBody Source
replyWithoutBody :: StatusCode -> Headers -> Req -> Effect Req
Send the reply without setting the body (cowboy_req:reply/3)
#replyStatus Source
replyStatus :: StatusCode -> Req -> Effect Req
Send the reply with already set headers and body (cowboy_req:reply/2)
#bindingWithDefault Source
bindingWithDefault :: forall a. Atom -> Req -> a -> a
#streamReply Source
streamReply :: StatusCode -> Headers -> Req -> Effect Req